mirror of
https://github.com/OMGeeky/google-apis-rs.git
synced 2026-02-23 15:49:49 +01:00
regenerate everything
This commit is contained in:
@@ -4,12 +4,12 @@
|
||||
[package]
|
||||
|
||||
name = "google-memcache1_beta2"
|
||||
version = "2.0.0+20210324"
|
||||
version = "2.0.3+20210324"
|
||||
authors = ["Sebastian Thiel <byronimo@gmail.com>"]
|
||||
description = "A complete library to interact with Cloud Memorystore for Memcached (protocol v1beta2)"
|
||||
repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/memcache1_beta2"
|
||||
repository = "https://github.com/Byron/google-apis-rs/tree/main/gen/memcache1_beta2"
|
||||
homepage = "https://cloud.google.com/memorystore/"
|
||||
documentation = "https://docs.rs/google-memcache1_beta2/2.0.0+20210324"
|
||||
documentation = "https://docs.rs/google-memcache1_beta2/2.0.3+20210324"
|
||||
license = "MIT"
|
||||
keywords = ["memcache", "google", "protocol", "web", "api"]
|
||||
autobins = false
|
||||
|
||||
@@ -5,16 +5,16 @@ DO NOT EDIT !
|
||||
-->
|
||||
The `google-memcache1_beta2` library allows access to all features of the *Google Cloud Memorystore for Memcached* service.
|
||||
|
||||
This documentation was generated from *Cloud Memorystore for Memcached* crate version *2.0.0+20210324*, where *20210324* is the exact revision of the *memcache:v1beta2* schema built by the [mako](http://www.makotemplates.org/) code generator *v2.0.0*.
|
||||
This documentation was generated from *Cloud Memorystore for Memcached* crate version *2.0.3+20210324*, where *20210324* is the exact revision of the *memcache:v1beta2* schema built by the [mako](http://www.makotemplates.org/) code generator *v2.0.3*.
|
||||
|
||||
Everything else about the *Cloud Memorystore for Memcached* *v1_beta2* API can be found at the
|
||||
[official documentation site](https://cloud.google.com/memorystore/).
|
||||
# Features
|
||||
|
||||
Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-memcache1_beta2/2.0.0+20210324/google_memcache1_beta2/CloudMemorystoreForMemcached) ...
|
||||
Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-memcache1_beta2/2.0.3+20210324/google_memcache1_beta2/CloudMemorystoreForMemcached) ...
|
||||
|
||||
* projects
|
||||
* [*locations get*](https://docs.rs/google-memcache1_beta2/2.0.0+20210324/google_memcache1_beta2/api::ProjectLocationGetCall), [*locations instances apply parameters*](https://docs.rs/google-memcache1_beta2/2.0.0+20210324/google_memcache1_beta2/api::ProjectLocationInstanceApplyParameterCall), [*locations instances apply software update*](https://docs.rs/google-memcache1_beta2/2.0.0+20210324/google_memcache1_beta2/api::ProjectLocationInstanceApplySoftwareUpdateCall), [*locations instances create*](https://docs.rs/google-memcache1_beta2/2.0.0+20210324/google_memcache1_beta2/api::ProjectLocationInstanceCreateCall), [*locations instances delete*](https://docs.rs/google-memcache1_beta2/2.0.0+20210324/google_memcache1_beta2/api::ProjectLocationInstanceDeleteCall), [*locations instances get*](https://docs.rs/google-memcache1_beta2/2.0.0+20210324/google_memcache1_beta2/api::ProjectLocationInstanceGetCall), [*locations instances list*](https://docs.rs/google-memcache1_beta2/2.0.0+20210324/google_memcache1_beta2/api::ProjectLocationInstanceListCall), [*locations instances patch*](https://docs.rs/google-memcache1_beta2/2.0.0+20210324/google_memcache1_beta2/api::ProjectLocationInstancePatchCall), [*locations instances update parameters*](https://docs.rs/google-memcache1_beta2/2.0.0+20210324/google_memcache1_beta2/api::ProjectLocationInstanceUpdateParameterCall), [*locations list*](https://docs.rs/google-memcache1_beta2/2.0.0+20210324/google_memcache1_beta2/api::ProjectLocationListCall), [*locations operations cancel*](https://docs.rs/google-memcache1_beta2/2.0.0+20210324/google_memcache1_beta2/api::ProjectLocationOperationCancelCall), [*locations operations delete*](https://docs.rs/google-memcache1_beta2/2.0.0+20210324/google_memcache1_beta2/api::ProjectLocationOperationDeleteCall), [*locations operations get*](https://docs.rs/google-memcache1_beta2/2.0.0+20210324/google_memcache1_beta2/api::ProjectLocationOperationGetCall) and [*locations operations list*](https://docs.rs/google-memcache1_beta2/2.0.0+20210324/google_memcache1_beta2/api::ProjectLocationOperationListCall)
|
||||
* [*locations get*](https://docs.rs/google-memcache1_beta2/2.0.3+20210324/google_memcache1_beta2/api::ProjectLocationGetCall), [*locations instances apply parameters*](https://docs.rs/google-memcache1_beta2/2.0.3+20210324/google_memcache1_beta2/api::ProjectLocationInstanceApplyParameterCall), [*locations instances apply software update*](https://docs.rs/google-memcache1_beta2/2.0.3+20210324/google_memcache1_beta2/api::ProjectLocationInstanceApplySoftwareUpdateCall), [*locations instances create*](https://docs.rs/google-memcache1_beta2/2.0.3+20210324/google_memcache1_beta2/api::ProjectLocationInstanceCreateCall), [*locations instances delete*](https://docs.rs/google-memcache1_beta2/2.0.3+20210324/google_memcache1_beta2/api::ProjectLocationInstanceDeleteCall), [*locations instances get*](https://docs.rs/google-memcache1_beta2/2.0.3+20210324/google_memcache1_beta2/api::ProjectLocationInstanceGetCall), [*locations instances list*](https://docs.rs/google-memcache1_beta2/2.0.3+20210324/google_memcache1_beta2/api::ProjectLocationInstanceListCall), [*locations instances patch*](https://docs.rs/google-memcache1_beta2/2.0.3+20210324/google_memcache1_beta2/api::ProjectLocationInstancePatchCall), [*locations instances update parameters*](https://docs.rs/google-memcache1_beta2/2.0.3+20210324/google_memcache1_beta2/api::ProjectLocationInstanceUpdateParameterCall), [*locations list*](https://docs.rs/google-memcache1_beta2/2.0.3+20210324/google_memcache1_beta2/api::ProjectLocationListCall), [*locations operations cancel*](https://docs.rs/google-memcache1_beta2/2.0.3+20210324/google_memcache1_beta2/api::ProjectLocationOperationCancelCall), [*locations operations delete*](https://docs.rs/google-memcache1_beta2/2.0.3+20210324/google_memcache1_beta2/api::ProjectLocationOperationDeleteCall), [*locations operations get*](https://docs.rs/google-memcache1_beta2/2.0.3+20210324/google_memcache1_beta2/api::ProjectLocationOperationGetCall) and [*locations operations list*](https://docs.rs/google-memcache1_beta2/2.0.3+20210324/google_memcache1_beta2/api::ProjectLocationOperationListCall)
|
||||
|
||||
|
||||
|
||||
@@ -23,17 +23,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-memcache1_beta2/2.0.0+20210324/google_memcache1_beta2/CloudMemorystoreForMemcached)**
|
||||
* **[Hub](https://docs.rs/google-memcache1_beta2/2.0.3+20210324/google_memcache1_beta2/CloudMemorystoreForMemcached)**
|
||||
* a central object to maintain state and allow accessing all *Activities*
|
||||
* creates [*Method Builders*](https://docs.rs/google-memcache1_beta2/2.0.0+20210324/google_memcache1_beta2/client::MethodsBuilder) which in turn
|
||||
allow access to individual [*Call Builders*](https://docs.rs/google-memcache1_beta2/2.0.0+20210324/google_memcache1_beta2/client::CallBuilder)
|
||||
* **[Resources](https://docs.rs/google-memcache1_beta2/2.0.0+20210324/google_memcache1_beta2/client::Resource)**
|
||||
* creates [*Method Builders*](https://docs.rs/google-memcache1_beta2/2.0.3+20210324/google_memcache1_beta2/client::MethodsBuilder) which in turn
|
||||
allow access to individual [*Call Builders*](https://docs.rs/google-memcache1_beta2/2.0.3+20210324/google_memcache1_beta2/client::CallBuilder)
|
||||
* **[Resources](https://docs.rs/google-memcache1_beta2/2.0.3+20210324/google_memcache1_beta2/client::Resource)**
|
||||
* primary types that you can apply *Activities* to
|
||||
* a collection of properties and *Parts*
|
||||
* **[Parts](https://docs.rs/google-memcache1_beta2/2.0.0+20210324/google_memcache1_beta2/client::Part)**
|
||||
* **[Parts](https://docs.rs/google-memcache1_beta2/2.0.3+20210324/google_memcache1_beta2/client::Part)**
|
||||
* a collection of properties
|
||||
* never directly used in *Activities*
|
||||
* **[Activities](https://docs.rs/google-memcache1_beta2/2.0.0+20210324/google_memcache1_beta2/client::CallBuilder)**
|
||||
* **[Activities](https://docs.rs/google-memcache1_beta2/2.0.3+20210324/google_memcache1_beta2/client::CallBuilder)**
|
||||
* operations to apply to *Resources*
|
||||
|
||||
All *structures* are marked with applicable traits to further categorize them and ease browsing.
|
||||
@@ -139,17 +139,17 @@ match result {
|
||||
```
|
||||
## Handling Errors
|
||||
|
||||
All errors produced by the system are provided either as [Result](https://docs.rs/google-memcache1_beta2/2.0.0+20210324/google_memcache1_beta2/client::Result) enumeration as return value of
|
||||
All errors produced by the system are provided either as [Result](https://docs.rs/google-memcache1_beta2/2.0.3+20210324/google_memcache1_beta2/client::Result) enumeration as return value of
|
||||
the doit() methods, or handed as possibly intermediate results to either the
|
||||
[Hub Delegate](https://docs.rs/google-memcache1_beta2/2.0.0+20210324/google_memcache1_beta2/client::Delegate), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html).
|
||||
[Hub Delegate](https://docs.rs/google-memcache1_beta2/2.0.3+20210324/google_memcache1_beta2/client::Delegate), 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-memcache1_beta2/2.0.0+20210324/google_memcache1_beta2/client::Result), should be
|
||||
If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-memcache1_beta2/2.0.3+20210324/google_memcache1_beta2/client::Result), should be
|
||||
read by you to obtain the media.
|
||||
If such a method also supports a [Response Result](https://docs.rs/google-memcache1_beta2/2.0.0+20210324/google_memcache1_beta2/client::ResponseResult), it will return that by default.
|
||||
If such a method also supports a [Response Result](https://docs.rs/google-memcache1_beta2/2.0.3+20210324/google_memcache1_beta2/client::ResponseResult), 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")`.
|
||||
|
||||
@@ -159,29 +159,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-memcache1_beta2/2.0.0+20210324/google_memcache1_beta2/client::Delegate) to the
|
||||
[Method Builder](https://docs.rs/google-memcache1_beta2/2.0.0+20210324/google_memcache1_beta2/client::CallBuilder) before making the final `doit()` call.
|
||||
You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-memcache1_beta2/2.0.3+20210324/google_memcache1_beta2/client::Delegate) to the
|
||||
[Method Builder](https://docs.rs/google-memcache1_beta2/2.0.3+20210324/google_memcache1_beta2/client::CallBuilder) 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-memcache1_beta2/2.0.0+20210324/google_memcache1_beta2/client::Delegate) is default-implemented, allowing you to customize it with minimal effort.
|
||||
The [delegate trait](https://docs.rs/google-memcache1_beta2/2.0.3+20210324/google_memcache1_beta2/client::Delegate) 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 [encodable](https://docs.rs/google-memcache1_beta2/2.0.0+20210324/google_memcache1_beta2/client::RequestValue) and
|
||||
[decodable](https://docs.rs/google-memcache1_beta2/2.0.0+20210324/google_memcache1_beta2/client::ResponseResult) via *json*. Optionals are used to indicate that partial requests are responses
|
||||
All structures provided by this library are made to be [encodable](https://docs.rs/google-memcache1_beta2/2.0.3+20210324/google_memcache1_beta2/client::RequestValue) and
|
||||
[decodable](https://docs.rs/google-memcache1_beta2/2.0.3+20210324/google_memcache1_beta2/client::ResponseResult) via *json*. Optionals are used to indicate that partial requests are responses
|
||||
are valid.
|
||||
Most optionals are are considered [Parts](https://docs.rs/google-memcache1_beta2/2.0.0+20210324/google_memcache1_beta2/client::Part) which are identifiable by name, which will be sent to
|
||||
Most optionals are are considered [Parts](https://docs.rs/google-memcache1_beta2/2.0.3+20210324/google_memcache1_beta2/client::Part) 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-memcache1_beta2/2.0.0+20210324/google_memcache1_beta2/client::CallBuilder), you are able to prepare an action call by repeatedly calling it's methods.
|
||||
Using [method builders](https://docs.rs/google-memcache1_beta2/2.0.3+20210324/google_memcache1_beta2/client::CallBuilder), 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-memcache1_beta2/2.0.0+20210324/google_memcache1_beta2/client::RequestValue) are moved
|
||||
* [request values](https://docs.rs/google-memcache1_beta2/2.0.3+20210324/google_memcache1_beta2/client::RequestValue) are moved
|
||||
|
||||
Arguments will always be copied or cloned into the builder, to make them independent of their original life times.
|
||||
|
||||
@@ -194,4 +194,4 @@ The **memcache1_beta2** library was generated by Sebastian Thiel, and is placed
|
||||
under the *MIT* license.
|
||||
You can read the full text at the repository's [license file][repo-license].
|
||||
|
||||
[repo-license]: https://github.com/Byron/google-apis-rsblob/master/LICENSE.md
|
||||
[repo-license]: https://github.com/Byron/google-apis-rsblob/main/LICENSE.md
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,5 @@
|
||||
// COPY OF 'src/rust/api/client.rs'
|
||||
// DO NOT EDIT
|
||||
use std;
|
||||
use std::error;
|
||||
use std::fmt::{self, Display};
|
||||
use std::io::{self, Cursor, Read, Seek, SeekFrom, Write};
|
||||
@@ -10,18 +9,16 @@ use std::time::Duration;
|
||||
|
||||
use itertools::Itertools;
|
||||
|
||||
use hyper;
|
||||
use hyper::body::Buf;
|
||||
use hyper::header::{HeaderMap, AUTHORIZATION, CONTENT_LENGTH, CONTENT_TYPE, USER_AGENT};
|
||||
use hyper::Method;
|
||||
use hyper::StatusCode;
|
||||
use hyper::body::Buf;
|
||||
|
||||
use mime::{Attr, Mime, SubLevel, TopLevel, Value};
|
||||
use oauth2;
|
||||
|
||||
use serde_json as json;
|
||||
|
||||
const LINE_ENDING: &'static str = "\r\n";
|
||||
const LINE_ENDING: &str = "\r\n";
|
||||
|
||||
pub enum Retry {
|
||||
/// Signal you don't want to retry
|
||||
@@ -307,9 +304,9 @@ impl Display for Error {
|
||||
err.domain,
|
||||
err.message,
|
||||
err.reason,
|
||||
match &err.location {
|
||||
&Some(ref loc) => format!("@{}", loc),
|
||||
&None => String::new(),
|
||||
match err.location {
|
||||
Some(ref loc) => format!("@{}", loc),
|
||||
None => String::new(),
|
||||
}
|
||||
)?;
|
||||
}
|
||||
@@ -357,7 +354,7 @@ pub struct MethodInfo {
|
||||
pub http_method: Method,
|
||||
}
|
||||
|
||||
const BOUNDARY: &'static str = "MDuXWGyeE33QFXGchb2VFWc4Z7945d";
|
||||
const BOUNDARY: &str = "MDuXWGyeE33QFXGchb2VFWc4Z7945d";
|
||||
|
||||
/// Provides a `Read` interface that converts multiple parts into the protocol
|
||||
/// identified by [RFC2387](https://tools.ietf.org/html/rfc2387).
|
||||
@@ -418,14 +415,14 @@ impl<'a> MultiPartReader<'a> {
|
||||
|
||||
/// Returns true if we are totally used
|
||||
fn is_depleted(&self) -> bool {
|
||||
self.raw_parts.len() == 0
|
||||
self.raw_parts.is_empty()
|
||||
&& self.current_part.is_none()
|
||||
&& self.last_part_boundary.is_none()
|
||||
}
|
||||
|
||||
/// Returns true if we are handling our last part
|
||||
fn is_last_part(&self) -> bool {
|
||||
self.raw_parts.len() == 0 && self.current_part.is_some()
|
||||
self.raw_parts.is_empty() && self.current_part.is_some()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -520,12 +517,12 @@ pub struct XUploadContentType(pub Mime);
|
||||
|
||||
impl ::std::ops::Deref for XUploadContentType {
|
||||
type Target = Mime;
|
||||
fn deref<'a>(&'a self) -> &'a Mime {
|
||||
fn deref(&self) -> &Mime {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl ::std::ops::DerefMut for XUploadContentType {
|
||||
fn deref_mut<'a>(&'a mut self) -> &'a mut Mime {
|
||||
fn deref_mut(&mut self) -> &mut Mime {
|
||||
&mut self.0
|
||||
}
|
||||
}
|
||||
@@ -595,11 +592,11 @@ pub struct RangeResponseHeader(pub Chunk);
|
||||
|
||||
impl RangeResponseHeader {
|
||||
fn from_bytes(raw: &[u8]) -> Self {
|
||||
if raw.len() > 0 {
|
||||
if !raw.is_empty() {
|
||||
if let Ok(s) = std::str::from_utf8(raw) {
|
||||
const PREFIX: &'static str = "bytes ";
|
||||
if s.starts_with(PREFIX) {
|
||||
if let Ok(c) = <Chunk as FromStr>::from_str(&s[PREFIX.len()..]) {
|
||||
const PREFIX: &str = "bytes ";
|
||||
if let Some(stripped) = s.strip_prefix(PREFIX) {
|
||||
if let Ok(c) = <Chunk as FromStr>::from_str(&stripped) {
|
||||
return RangeResponseHeader(c);
|
||||
}
|
||||
}
|
||||
@@ -612,13 +609,13 @@ impl RangeResponseHeader {
|
||||
|
||||
/// A utility type to perform a resumable upload from start to end.
|
||||
pub struct ResumableUploadHelper<'a, A: 'a> {
|
||||
pub client: &'a mut hyper::client::Client<
|
||||
pub client: &'a hyper::client::Client<
|
||||
hyper_rustls::HttpsConnector<hyper::client::connect::HttpConnector>,
|
||||
hyper::body::Body,
|
||||
>,
|
||||
pub delegate: &'a mut dyn Delegate,
|
||||
pub start_at: Option<u64>,
|
||||
pub auth: &'a mut A,
|
||||
pub auth: &'a A,
|
||||
pub user_agent: &'a str,
|
||||
pub auth_header: String,
|
||||
pub url: &'a str,
|
||||
@@ -810,7 +807,7 @@ pub fn remove_json_null_values(value: &mut json::value::Value) {
|
||||
|
||||
// Borrowing the body object as mutable and converts it to a string
|
||||
pub async fn get_body_as_string(res_body: &mut hyper::Body) -> String {
|
||||
let res_body_buf = hyper::body::aggregate(res_body).await.unwrap();
|
||||
let res_body_string = String::from_utf8_lossy(res_body_buf.chunk());
|
||||
let res_body_buf = hyper::body::to_bytes(res_body).await.unwrap();
|
||||
let res_body_string = String::from_utf8_lossy(&res_body_buf);
|
||||
res_body_string.to_string()
|
||||
}
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
// This file was generated automatically from 'src/mako/api/lib.rs.mako'
|
||||
// DO NOT EDIT !
|
||||
|
||||
//! This documentation was generated from *Cloud Memorystore for Memcached* crate version *2.0.0+20210324*, where *20210324* is the exact revision of the *memcache:v1beta2* schema built by the [mako](http://www.makotemplates.org/) code generator *v2.0.0*.
|
||||
//! This documentation was generated from *Cloud Memorystore for Memcached* crate version *2.0.3+20210324*, where *20210324* is the exact revision of the *memcache:v1beta2* schema built by the [mako](http://www.makotemplates.org/) code generator *v2.0.3*.
|
||||
//!
|
||||
//! Everything else about the *Cloud Memorystore for Memcached* *v1_beta2* API can be found at the
|
||||
//! [official documentation site](https://cloud.google.com/memorystore/).
|
||||
//! The original source code is [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/memcache1_beta2).
|
||||
//! The original source code is [on github](https://github.com/Byron/google-apis-rs/tree/main/gen/memcache1_beta2).
|
||||
//! # Features
|
||||
//!
|
||||
//! Handle the following *Resources* with ease from the central [hub](CloudMemorystoreForMemcached) ...
|
||||
|
||||
Reference in New Issue
Block a user