mirror of
https://github.com/OMGeeky/google-apis-rs.git
synced 2026-02-23 15:49:49 +01:00
Bump version to 1.0.9; update JSON schemas; add new APIs
This commit is contained in:
@@ -748,6 +748,17 @@ pub fn remove_json_null_values(value: &mut json::value::Value) {
|
||||
map.remove(key);
|
||||
}
|
||||
}
|
||||
json::value::Value::Array(ref mut arr) => {
|
||||
let mut i = 0;
|
||||
while i < arr.len() {
|
||||
if arr[i].is_null() {
|
||||
arr.remove(i);
|
||||
} else {
|
||||
remove_json_null_values(&mut arr[i]);
|
||||
i += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// This file was generated automatically from 'src/mako/api/lib.rs.mako'
|
||||
// DO NOT EDIT !
|
||||
|
||||
//! This documentation was generated from *Vault* crate version *1.0.8+20190312*, where *20190312* is the exact revision of the *vault:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.8*.
|
||||
//! This documentation was generated from *Vault* crate version *1.0.9+20190614*, where *20190614* is the exact revision of the *vault:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.9*.
|
||||
//!
|
||||
//! Everything else about the *Vault* *v1* API can be found at the
|
||||
//! [official documentation site](https://developers.google.com/vault).
|
||||
@@ -241,9 +241,7 @@ use std::mem;
|
||||
use std::thread::sleep;
|
||||
use std::time::Duration;
|
||||
|
||||
pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, Error, CallBuilder, Hub, ReadSeek, Part,
|
||||
ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, MethodsBuilder,
|
||||
Resource, ErrorResponse, remove_json_null_values};
|
||||
pub use cmn::*;
|
||||
|
||||
|
||||
// ##############
|
||||
@@ -356,7 +354,7 @@ impl<'a, C, A> Vault<C, A>
|
||||
Vault {
|
||||
client: RefCell::new(client),
|
||||
auth: RefCell::new(authenticator),
|
||||
_user_agent: "google-api-rust-client/1.0.8".to_string(),
|
||||
_user_agent: "google-api-rust-client/1.0.9".to_string(),
|
||||
_base_url: "https://vault.googleapis.com/".to_string(),
|
||||
_root_url: "https://vault.googleapis.com/".to_string(),
|
||||
}
|
||||
@@ -367,7 +365,7 @@ impl<'a, C, A> Vault<C, A>
|
||||
}
|
||||
|
||||
/// Set the user-agent header field to use in all requests to the server.
|
||||
/// It defaults to `google-api-rust-client/1.0.8`.
|
||||
/// It defaults to `google-api-rust-client/1.0.9`.
|
||||
///
|
||||
/// Returns the previously set user-agent.
|
||||
pub fn user_agent(&mut self, agent_name: String) -> String {
|
||||
@@ -554,58 +552,13 @@ pub struct HangoutsChatOptions {
|
||||
impl Part for HangoutsChatOptions {}
|
||||
|
||||
|
||||
/// The `Status` type defines a logical error model that is suitable for different
|
||||
/// programming environments, including REST APIs and RPC APIs. It is used by
|
||||
/// [gRPC](https://github.com/grpc). The error model is designed to be:
|
||||
/// The `Status` type defines a logical error model that is suitable for
|
||||
/// different programming environments, including REST APIs and RPC APIs. It is
|
||||
/// used by [gRPC](https://github.com/grpc). Each `Status` message contains
|
||||
/// three pieces of data: error code, error message, and error details.
|
||||
///
|
||||
/// - Simple to use and understand for most users
|
||||
/// - Flexible enough to meet unexpected needs
|
||||
///
|
||||
/// # Overview
|
||||
///
|
||||
/// The `Status` message contains three pieces of data: error code, error message,
|
||||
/// and error details. The error code should be an enum value of
|
||||
/// google.rpc.Code, but it may accept additional error codes if needed. The
|
||||
/// error message should be a developer-facing English message that helps
|
||||
/// developers *understand* and *resolve* the error. If a localized user-facing
|
||||
/// error message is needed, put the localized message in the error details or
|
||||
/// localize it in the client. The optional error details may contain arbitrary
|
||||
/// information about the error. There is a predefined set of error detail types
|
||||
/// in the package `google.rpc` that can be used for common error conditions.
|
||||
///
|
||||
/// # Language mapping
|
||||
///
|
||||
/// The `Status` message is the logical representation of the error model, but it
|
||||
/// is not necessarily the actual wire format. When the `Status` message is
|
||||
/// exposed in different client libraries and different wire protocols, it can be
|
||||
/// mapped differently. For example, it will likely be mapped to some exceptions
|
||||
/// in Java, but more likely mapped to some error codes in C.
|
||||
///
|
||||
/// # Other uses
|
||||
///
|
||||
/// The error model and the `Status` message can be used in a variety of
|
||||
/// environments, either with or without APIs, to provide a
|
||||
/// consistent developer experience across different environments.
|
||||
///
|
||||
/// Example uses of this error model include:
|
||||
///
|
||||
/// - Partial errors. If a service needs to return partial errors to the client,
|
||||
/// it may embed the `Status` in the normal response to indicate the partial
|
||||
/// errors.
|
||||
///
|
||||
/// - Workflow errors. A typical workflow has multiple steps. Each step may
|
||||
/// have a `Status` message for error reporting.
|
||||
///
|
||||
/// - Batch operations. If a client uses batch request and batch response, the
|
||||
/// `Status` message should be used directly inside batch response, one for
|
||||
/// each error sub-response.
|
||||
///
|
||||
/// - Asynchronous operations. If an API call embeds asynchronous operation
|
||||
/// results in its response, the status of those operations should be
|
||||
/// represented directly using the `Status` message.
|
||||
///
|
||||
/// - Logging. If some API errors are stored in logs, the message `Status` could
|
||||
/// be used directly after any stripping needed for security/privacy reasons.
|
||||
/// You can find out more about this error model and how to work with it in the
|
||||
/// [API Design Guide](https://cloud.google.com/apis/design/errors).
|
||||
///
|
||||
/// This type is not used in any activity, and only used as *part* of another schema.
|
||||
///
|
||||
@@ -632,8 +585,9 @@ impl Part for Status {}
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct DriveExportOptions {
|
||||
/// Set to true to include access level information for users
|
||||
/// with <a href="https://support.google.com/vault/answer/6099459#metadata">indirect access</a>
|
||||
/// to files.
|
||||
/// with <a
|
||||
/// href="https://support.google.com/vault/answer/6099459#metadata">indirect
|
||||
/// access</a> to files.
|
||||
#[serde(rename="includeAccessInfo")]
|
||||
pub include_access_info: Option<bool>,
|
||||
}
|
||||
@@ -656,7 +610,8 @@ impl Part for DriveExportOptions {}
|
||||
pub struct MatterPermission {
|
||||
/// The user's role in this matter.
|
||||
pub role: Option<String>,
|
||||
/// The account id, as provided by <a href="https://developers.google.com/admin-sdk/">Admin SDK</a>.
|
||||
/// The account id, as provided by <a
|
||||
/// href="https://developers.google.com/admin-sdk/">Admin SDK</a>.
|
||||
#[serde(rename="accountId")]
|
||||
pub account_id: Option<String>,
|
||||
}
|
||||
@@ -830,6 +785,9 @@ impl ResponseResult for Hold {}
|
||||
///
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct DriveOptions {
|
||||
/// Set to true to include shared drive.
|
||||
#[serde(rename="includeSharedDrives")]
|
||||
pub include_shared_drives: Option<bool>,
|
||||
/// Search the versions of the Drive file
|
||||
/// as of the reference date. These timestamps are in GMT and
|
||||
/// rounded down to the given date.
|
||||
@@ -861,6 +819,21 @@ pub struct CloseMatterResponse {
|
||||
impl ResponseResult for CloseMatterResponse {}
|
||||
|
||||
|
||||
/// Shared drives to search
|
||||
///
|
||||
/// This type is not used in any activity, and only used as *part* of another schema.
|
||||
///
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct SharedDriveInfo {
|
||||
/// List of Shared drive ids, as provided by <a
|
||||
/// href="https://developers.google.com/drive">Drive API</a>.
|
||||
#[serde(rename="sharedDriveIds")]
|
||||
pub shared_drive_ids: Option<Vec<String>>,
|
||||
}
|
||||
|
||||
impl Part for SharedDriveInfo {}
|
||||
|
||||
|
||||
/// Response to a ReopenMatterRequest.
|
||||
///
|
||||
/// # Activities
|
||||
@@ -1014,7 +987,8 @@ impl ResponseResult for ListHoldsResponse {}
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct OrgUnitInfo {
|
||||
/// Org unit to search, as provided by the
|
||||
/// <a href="https://developers.google.com/admin-sdk/directory/">Admin SDK Directory API</a>.
|
||||
/// <a href="https://developers.google.com/admin-sdk/directory/">Admin SDK
|
||||
/// Directory API</a>.
|
||||
#[serde(rename="orgUnitId")]
|
||||
pub org_unit_id: Option<String>,
|
||||
}
|
||||
@@ -1060,9 +1034,23 @@ impl Part for AddHeldAccountResult {}
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct Query {
|
||||
/// The corpus-specific
|
||||
/// <a href="https://support.google.com/vault/answer/2474474">search operators</a>
|
||||
/// used to generate search results.
|
||||
/// <a href="https://support.google.com/vault/answer/2474474">search
|
||||
/// operators</a> used to generate search results.
|
||||
pub terms: Option<String>,
|
||||
/// The search method to use.
|
||||
#[serde(rename="searchMethod")]
|
||||
pub search_method: Option<String>,
|
||||
/// The start time range for the search query. These timestamps are in GMT and
|
||||
/// rounded down to the start of the given date.
|
||||
#[serde(rename="startTime")]
|
||||
pub start_time: Option<String>,
|
||||
/// For Drive search, specify more options in this field.
|
||||
#[serde(rename="driveOptions")]
|
||||
pub drive_options: Option<DriveOptions>,
|
||||
/// When 'SHARED_DRIVE' is chosen as search method, shared_drive_info needs
|
||||
/// to be specified.
|
||||
#[serde(rename="sharedDriveInfo")]
|
||||
pub shared_drive_info: Option<SharedDriveInfo>,
|
||||
/// When 'TEAM_DRIVE' is chosen as search method, team_drive_info needs to be
|
||||
/// specified.
|
||||
#[serde(rename="teamDriveInfo")]
|
||||
@@ -1070,24 +1058,17 @@ pub struct Query {
|
||||
/// For mail search, specify more options in this field.
|
||||
#[serde(rename="mailOptions")]
|
||||
pub mail_options: Option<MailOptions>,
|
||||
/// The search method to use.
|
||||
#[serde(rename="searchMethod")]
|
||||
pub search_method: Option<String>,
|
||||
/// When 'ROOM' is chosen as search method, hangout_chats_info needs to be
|
||||
/// specified. (read-only)
|
||||
#[serde(rename="hangoutsChatInfo")]
|
||||
pub hangouts_chat_info: Option<HangoutsChatInfo>,
|
||||
/// The data source to search from.
|
||||
#[serde(rename="dataScope")]
|
||||
pub data_scope: Option<String>,
|
||||
/// When 'ACCOUNT' is chosen as search method,
|
||||
/// account_info needs to be specified.
|
||||
#[serde(rename="accountInfo")]
|
||||
pub account_info: Option<AccountInfo>,
|
||||
/// For Drive search, specify more options in this field.
|
||||
#[serde(rename="driveOptions")]
|
||||
pub drive_options: Option<DriveOptions>,
|
||||
/// The start time range for the search query. These timestamps are in GMT and
|
||||
/// rounded down to the start of the given date.
|
||||
#[serde(rename="startTime")]
|
||||
pub start_time: Option<String>,
|
||||
/// When 'ORG_UNIT' is chosen as as search method, org_unit_info needs
|
||||
/// to be specified.
|
||||
#[serde(rename="orgUnitInfo")]
|
||||
@@ -1105,9 +1086,11 @@ pub struct Query {
|
||||
/// rounded down to the start of the given date.
|
||||
#[serde(rename="endTime")]
|
||||
pub end_time: Option<String>,
|
||||
/// The data source to search from.
|
||||
#[serde(rename="dataScope")]
|
||||
pub data_scope: Option<String>,
|
||||
/// The search method to use. This field is similar to the search_method field
|
||||
/// but is introduced to support shared drives. It supports all
|
||||
/// search method types. In case the search_method is TEAM_DRIVE the response
|
||||
/// of this field will be SHARED_DRIVE only.
|
||||
pub method: Option<String>,
|
||||
/// For hangouts chat search, specify more options in this field. (read-only)
|
||||
#[serde(rename="hangoutsChatOptions")]
|
||||
pub hangouts_chat_options: Option<HangoutsChatOptions>,
|
||||
@@ -1183,9 +1166,18 @@ impl RequestValue for UndeleteMatterRequest {}
|
||||
///
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct HeldAccount {
|
||||
/// When the account was put on hold.
|
||||
/// Output only. The last name of the account holder.
|
||||
#[serde(rename="lastName")]
|
||||
pub last_name: Option<String>,
|
||||
/// Output only. When the account was put on hold.
|
||||
#[serde(rename="holdTime")]
|
||||
pub hold_time: Option<String>,
|
||||
/// The primary email address of the account. If used as an input, this takes
|
||||
/// precedence over account ID.
|
||||
pub email: Option<String>,
|
||||
/// Output only. The first name of the account holder.
|
||||
#[serde(rename="firstName")]
|
||||
pub first_name: Option<String>,
|
||||
/// The account's ID as provided by the
|
||||
/// <a href="https://developers.google.com/admin-sdk/">Admin SDK</a>.
|
||||
#[serde(rename="accountId")]
|
||||
@@ -1481,6 +1473,9 @@ impl ResponseResult for ListMattersResponse {}
|
||||
///
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct HeldDriveQuery {
|
||||
/// If true, include files in shared drives in the hold.
|
||||
#[serde(rename="includeSharedDriveFiles")]
|
||||
pub include_shared_drive_files: Option<bool>,
|
||||
/// If true, include files in Team Drives in the hold.
|
||||
#[serde(rename="includeTeamDriveFiles")]
|
||||
pub include_team_drive_files: Option<bool>,
|
||||
|
||||
Reference in New Issue
Block a user