mirror of
https://github.com/OMGeeky/google-apis-rs.git
synced 2026-02-23 15:49:49 +01:00
make regen-apis
This commit is contained in:
@@ -4,12 +4,12 @@
|
||||
[package]
|
||||
|
||||
name = "google-cloudsupport2_beta"
|
||||
version = "5.0.4+20240304"
|
||||
version = "5.0.5+20240416"
|
||||
authors = ["Sebastian Thiel <byronimo@gmail.com>"]
|
||||
description = "A complete library to interact with Cloud Support (protocol v2beta)"
|
||||
repository = "https://github.com/Byron/google-apis-rs/tree/main/gen/cloudsupport2_beta"
|
||||
homepage = "https://cloud.google.com/support/docs/apis"
|
||||
documentation = "https://docs.rs/google-cloudsupport2_beta/5.0.4+20240304"
|
||||
documentation = "https://docs.rs/google-cloudsupport2_beta/5.0.5+20240416"
|
||||
license = "MIT"
|
||||
keywords = ["cloudsupport", "google", "protocol", "web", "api"]
|
||||
autobins = false
|
||||
@@ -18,12 +18,12 @@ edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
anyhow = "^ 1.0"
|
||||
hyper-rustls = "0.24.0"
|
||||
hyper-rustls = "0.25.0"
|
||||
mime = "^ 0.3.0"
|
||||
serde = { version = "^ 1.0", features = ["derive"] }
|
||||
serde_json = "^ 1.0"
|
||||
itertools = "^ 0.10"
|
||||
google-apis-common = { path = "../../google-apis-common", version = "6.0" }
|
||||
google-apis-common = { path = "../../google-apis-common", version = "6.0.3" }
|
||||
hyper = "^ 0.14"
|
||||
http = "^0.2"
|
||||
tokio = "^1.0"
|
||||
|
||||
@@ -6,7 +6,7 @@ DO NOT EDIT !
|
||||
The MIT License (MIT)
|
||||
=====================
|
||||
|
||||
Copyright © `2015-2020` `Sebastian Thiel`
|
||||
Copyright 2015–2024 Sebastian Thiel
|
||||
|
||||
Permission is hereby granted, free of charge, to any person
|
||||
obtaining a copy of this software and associated documentation
|
||||
|
||||
@@ -5,29 +5,29 @@ DO NOT EDIT !
|
||||
-->
|
||||
The `google-cloudsupport2_beta` library allows access to all features of the *Google Cloud Support* service.
|
||||
|
||||
This documentation was generated from *Cloud Support* crate version *5.0.4+20240304*, where *20240304* is the exact revision of the *cloudsupport:v2beta* schema built by the [mako](http://www.makotemplates.org/) code generator *v5.0.4*.
|
||||
This documentation was generated from *Cloud Support* crate version *5.0.5+20240416*, where *20240416* is the exact revision of the *cloudsupport:v2beta* schema built by the [mako](http://www.makotemplates.org/) code generator *v5.0.5*.
|
||||
|
||||
Everything else about the *Cloud Support* *v2_beta* API can be found at the
|
||||
[official documentation site](https://cloud.google.com/support/docs/apis).
|
||||
# Features
|
||||
|
||||
Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-cloudsupport2_beta/5.0.4+20240304/google_cloudsupport2_beta/CloudSupport) ...
|
||||
Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-cloudsupport2_beta/5.0.5+20240416/google_cloudsupport2_beta/CloudSupport) ...
|
||||
|
||||
* [case classifications](https://docs.rs/google-cloudsupport2_beta/5.0.4+20240304/google_cloudsupport2_beta/api::CaseClassification)
|
||||
* [*search*](https://docs.rs/google-cloudsupport2_beta/5.0.4+20240304/google_cloudsupport2_beta/api::CaseClassificationSearchCall)
|
||||
* [cases](https://docs.rs/google-cloudsupport2_beta/5.0.4+20240304/google_cloudsupport2_beta/api::Case)
|
||||
* [*attachments list*](https://docs.rs/google-cloudsupport2_beta/5.0.4+20240304/google_cloudsupport2_beta/api::CaseAttachmentListCall), [*close*](https://docs.rs/google-cloudsupport2_beta/5.0.4+20240304/google_cloudsupport2_beta/api::CaseCloseCall), [*comments create*](https://docs.rs/google-cloudsupport2_beta/5.0.4+20240304/google_cloudsupport2_beta/api::CaseCommentCreateCall), [*comments list*](https://docs.rs/google-cloudsupport2_beta/5.0.4+20240304/google_cloudsupport2_beta/api::CaseCommentListCall), [*create*](https://docs.rs/google-cloudsupport2_beta/5.0.4+20240304/google_cloudsupport2_beta/api::CaseCreateCall), [*escalate*](https://docs.rs/google-cloudsupport2_beta/5.0.4+20240304/google_cloudsupport2_beta/api::CaseEscalateCall), [*get*](https://docs.rs/google-cloudsupport2_beta/5.0.4+20240304/google_cloudsupport2_beta/api::CaseGetCall), [*list*](https://docs.rs/google-cloudsupport2_beta/5.0.4+20240304/google_cloudsupport2_beta/api::CaseListCall), [*patch*](https://docs.rs/google-cloudsupport2_beta/5.0.4+20240304/google_cloudsupport2_beta/api::CasePatchCall) and [*search*](https://docs.rs/google-cloudsupport2_beta/5.0.4+20240304/google_cloudsupport2_beta/api::CaseSearchCall)
|
||||
* [media](https://docs.rs/google-cloudsupport2_beta/5.0.4+20240304/google_cloudsupport2_beta/api::Media)
|
||||
* [*download*](https://docs.rs/google-cloudsupport2_beta/5.0.4+20240304/google_cloudsupport2_beta/api::MediaDownloadCall) and [*upload*](https://docs.rs/google-cloudsupport2_beta/5.0.4+20240304/google_cloudsupport2_beta/api::MediaUploadCall)
|
||||
* [case classifications](https://docs.rs/google-cloudsupport2_beta/5.0.5+20240416/google_cloudsupport2_beta/api::CaseClassification)
|
||||
* [*search*](https://docs.rs/google-cloudsupport2_beta/5.0.5+20240416/google_cloudsupport2_beta/api::CaseClassificationSearchCall)
|
||||
* [cases](https://docs.rs/google-cloudsupport2_beta/5.0.5+20240416/google_cloudsupport2_beta/api::Case)
|
||||
* [*attachments list*](https://docs.rs/google-cloudsupport2_beta/5.0.5+20240416/google_cloudsupport2_beta/api::CaseAttachmentListCall), [*close*](https://docs.rs/google-cloudsupport2_beta/5.0.5+20240416/google_cloudsupport2_beta/api::CaseCloseCall), [*comments create*](https://docs.rs/google-cloudsupport2_beta/5.0.5+20240416/google_cloudsupport2_beta/api::CaseCommentCreateCall), [*comments list*](https://docs.rs/google-cloudsupport2_beta/5.0.5+20240416/google_cloudsupport2_beta/api::CaseCommentListCall), [*create*](https://docs.rs/google-cloudsupport2_beta/5.0.5+20240416/google_cloudsupport2_beta/api::CaseCreateCall), [*escalate*](https://docs.rs/google-cloudsupport2_beta/5.0.5+20240416/google_cloudsupport2_beta/api::CaseEscalateCall), [*get*](https://docs.rs/google-cloudsupport2_beta/5.0.5+20240416/google_cloudsupport2_beta/api::CaseGetCall), [*list*](https://docs.rs/google-cloudsupport2_beta/5.0.5+20240416/google_cloudsupport2_beta/api::CaseListCall), [*patch*](https://docs.rs/google-cloudsupport2_beta/5.0.5+20240416/google_cloudsupport2_beta/api::CasePatchCall) and [*search*](https://docs.rs/google-cloudsupport2_beta/5.0.5+20240416/google_cloudsupport2_beta/api::CaseSearchCall)
|
||||
* [media](https://docs.rs/google-cloudsupport2_beta/5.0.5+20240416/google_cloudsupport2_beta/api::Media)
|
||||
* [*download*](https://docs.rs/google-cloudsupport2_beta/5.0.5+20240416/google_cloudsupport2_beta/api::MediaDownloadCall) and [*upload*](https://docs.rs/google-cloudsupport2_beta/5.0.5+20240416/google_cloudsupport2_beta/api::MediaUploadCall)
|
||||
|
||||
|
||||
Upload supported by ...
|
||||
|
||||
* [*upload media*](https://docs.rs/google-cloudsupport2_beta/5.0.4+20240304/google_cloudsupport2_beta/api::MediaUploadCall)
|
||||
* [*upload media*](https://docs.rs/google-cloudsupport2_beta/5.0.5+20240416/google_cloudsupport2_beta/api::MediaUploadCall)
|
||||
|
||||
Download supported by ...
|
||||
|
||||
* [*download media*](https://docs.rs/google-cloudsupport2_beta/5.0.4+20240304/google_cloudsupport2_beta/api::MediaDownloadCall)
|
||||
* [*download media*](https://docs.rs/google-cloudsupport2_beta/5.0.5+20240416/google_cloudsupport2_beta/api::MediaDownloadCall)
|
||||
|
||||
|
||||
|
||||
@@ -35,17 +35,17 @@ Download supported by ...
|
||||
|
||||
The API is structured into the following primary items:
|
||||
|
||||
* **[Hub](https://docs.rs/google-cloudsupport2_beta/5.0.4+20240304/google_cloudsupport2_beta/CloudSupport)**
|
||||
* **[Hub](https://docs.rs/google-cloudsupport2_beta/5.0.5+20240416/google_cloudsupport2_beta/CloudSupport)**
|
||||
* a central object to maintain state and allow accessing all *Activities*
|
||||
* creates [*Method Builders*](https://docs.rs/google-cloudsupport2_beta/5.0.4+20240304/google_cloudsupport2_beta/client::MethodsBuilder) which in turn
|
||||
allow access to individual [*Call Builders*](https://docs.rs/google-cloudsupport2_beta/5.0.4+20240304/google_cloudsupport2_beta/client::CallBuilder)
|
||||
* **[Resources](https://docs.rs/google-cloudsupport2_beta/5.0.4+20240304/google_cloudsupport2_beta/client::Resource)**
|
||||
* creates [*Method Builders*](https://docs.rs/google-cloudsupport2_beta/5.0.5+20240416/google_cloudsupport2_beta/client::MethodsBuilder) which in turn
|
||||
allow access to individual [*Call Builders*](https://docs.rs/google-cloudsupport2_beta/5.0.5+20240416/google_cloudsupport2_beta/client::CallBuilder)
|
||||
* **[Resources](https://docs.rs/google-cloudsupport2_beta/5.0.5+20240416/google_cloudsupport2_beta/client::Resource)**
|
||||
* primary types that you can apply *Activities* to
|
||||
* a collection of properties and *Parts*
|
||||
* **[Parts](https://docs.rs/google-cloudsupport2_beta/5.0.4+20240304/google_cloudsupport2_beta/client::Part)**
|
||||
* **[Parts](https://docs.rs/google-cloudsupport2_beta/5.0.5+20240416/google_cloudsupport2_beta/client::Part)**
|
||||
* a collection of properties
|
||||
* never directly used in *Activities*
|
||||
* **[Activities](https://docs.rs/google-cloudsupport2_beta/5.0.4+20240304/google_cloudsupport2_beta/client::CallBuilder)**
|
||||
* **[Activities](https://docs.rs/google-cloudsupport2_beta/5.0.5+20240416/google_cloudsupport2_beta/client::CallBuilder)**
|
||||
* operations to apply to *Resources*
|
||||
|
||||
All *structures* are marked with applicable traits to further categorize them and ease browsing.
|
||||
@@ -71,8 +71,8 @@ let r = hub.cases().patch(...).doit().await
|
||||
let r = hub.cases().search(...).doit().await
|
||||
```
|
||||
|
||||
The `resource()` and `activity(...)` calls create [builders][builder-pattern]. The second one dealing with `Activities`
|
||||
supports various methods to configure the impending operation (not shown here). It is made such that all required arguments have to be
|
||||
The `resource()` and `activity(...)` calls create [builders][builder-pattern]. The second one dealing with `Activities`
|
||||
supports various methods to configure the impending operation (not shown here). It is made such that all required arguments have to be
|
||||
specified right away (i.e. `(...)`), whereas all optional ones can be [build up][builder-pattern] as desired.
|
||||
The `doit()` method performs the actual communication with the server and returns the respective result.
|
||||
|
||||
@@ -96,30 +96,30 @@ extern crate hyper;
|
||||
extern crate hyper_rustls;
|
||||
extern crate google_cloudsupport2_beta as cloudsupport2_beta;
|
||||
use cloudsupport2_beta::{Result, Error};
|
||||
use cloudsupport2_beta::api::enums::*;
|
||||
use std::default::Default;
|
||||
use cloudsupport2_beta::{CloudSupport, oauth2, hyper, hyper_rustls, chrono, FieldMask};
|
||||
|
||||
// Get an ApplicationSecret instance by some means. It contains the `client_id` and
|
||||
// Get an ApplicationSecret instance by some means. It contains the `client_id` and
|
||||
// `client_secret`, among other things.
|
||||
let secret: oauth2::ApplicationSecret = Default::default();
|
||||
// Instantiate the authenticator. It will choose a suitable authentication flow for you,
|
||||
// Instantiate the authenticator. It will choose a suitable authentication flow for you,
|
||||
// unless you replace `None` with the desired Flow.
|
||||
// Provide your own `AuthenticatorDelegate` to adjust the way it operates and get feedback about
|
||||
// Provide your own `AuthenticatorDelegate` to adjust the way it operates and get feedback about
|
||||
// what's going on. You probably want to bring in your own `TokenStorage` to persist tokens and
|
||||
// retrieve them from storage.
|
||||
let auth = oauth2::InstalledFlowAuthenticator::builder(
|
||||
secret,
|
||||
oauth2::InstalledFlowReturnMethod::HTTPRedirect,
|
||||
).build().await.unwrap();
|
||||
let mut hub = CloudSupport::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().https_or_http().enable_http1().build()), auth);
|
||||
let mut hub = CloudSupport::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().unwrap().https_or_http().enable_http1().build()), auth);
|
||||
// You can configure optional parameters by calling the respective setters at will, and
|
||||
// execute the final call using `doit()`.
|
||||
// Values shown here are possibly random and not representative !
|
||||
let result = hub.cases().list("parent")
|
||||
.product_line("magna")
|
||||
.page_token("no")
|
||||
.page_size(-55)
|
||||
.filter("voluptua.")
|
||||
.page_token("magna")
|
||||
.page_size(-11)
|
||||
.filter("ipsum")
|
||||
.doit().await;
|
||||
|
||||
match result {
|
||||
@@ -143,49 +143,49 @@ match result {
|
||||
```
|
||||
## Handling Errors
|
||||
|
||||
All errors produced by the system are provided either as [Result](https://docs.rs/google-cloudsupport2_beta/5.0.4+20240304/google_cloudsupport2_beta/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-cloudsupport2_beta/5.0.4+20240304/google_cloudsupport2_beta/client::Delegate), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html).
|
||||
All errors produced by the system are provided either as [Result](https://docs.rs/google-cloudsupport2_beta/5.0.5+20240416/google_cloudsupport2_beta/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-cloudsupport2_beta/5.0.5+20240416/google_cloudsupport2_beta/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
|
||||
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-cloudsupport2_beta/5.0.4+20240304/google_cloudsupport2_beta/client::Result), should be
|
||||
If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-cloudsupport2_beta/5.0.5+20240416/google_cloudsupport2_beta/client::Result), should be
|
||||
read by you to obtain the media.
|
||||
If such a method also supports a [Response Result](https://docs.rs/google-cloudsupport2_beta/5.0.4+20240304/google_cloudsupport2_beta/client::ResponseResult), it will return that by default.
|
||||
If such a method also supports a [Response Result](https://docs.rs/google-cloudsupport2_beta/5.0.5+20240416/google_cloudsupport2_beta/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")`.
|
||||
|
||||
Methods supporting uploads can do so using up to 2 different protocols:
|
||||
*simple* and *resumable*. The distinctiveness of each is represented by customized
|
||||
Methods supporting uploads can do so using up to 2 different protocols:
|
||||
*simple* and *resumable*. The distinctiveness of each is represented by customized
|
||||
`doit(...)` methods, which are then named `upload(...)` and `upload_resumable(...)` respectively.
|
||||
|
||||
## Customization and Callbacks
|
||||
|
||||
You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-cloudsupport2_beta/5.0.4+20240304/google_cloudsupport2_beta/client::Delegate) to the
|
||||
[Method Builder](https://docs.rs/google-cloudsupport2_beta/5.0.4+20240304/google_cloudsupport2_beta/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
|
||||
You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-cloudsupport2_beta/5.0.5+20240416/google_cloudsupport2_beta/client::Delegate) to the
|
||||
[Method Builder](https://docs.rs/google-cloudsupport2_beta/5.0.5+20240416/google_cloudsupport2_beta/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-cloudsupport2_beta/5.0.4+20240304/google_cloudsupport2_beta/client::Delegate) is default-implemented, allowing you to customize it with minimal effort.
|
||||
The [delegate trait](https://docs.rs/google-cloudsupport2_beta/5.0.5+20240416/google_cloudsupport2_beta/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-cloudsupport2_beta/5.0.4+20240304/google_cloudsupport2_beta/client::RequestValue) and
|
||||
[decodable](https://docs.rs/google-cloudsupport2_beta/5.0.4+20240304/google_cloudsupport2_beta/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-cloudsupport2_beta/5.0.5+20240416/google_cloudsupport2_beta/client::RequestValue) and
|
||||
[decodable](https://docs.rs/google-cloudsupport2_beta/5.0.5+20240416/google_cloudsupport2_beta/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-cloudsupport2_beta/5.0.4+20240304/google_cloudsupport2_beta/client::Part) which are identifiable by name, which will be sent to
|
||||
Most optionals are are considered [Parts](https://docs.rs/google-cloudsupport2_beta/5.0.5+20240416/google_cloudsupport2_beta/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-cloudsupport2_beta/5.0.4+20240304/google_cloudsupport2_beta/client::CallBuilder), you are able to prepare an action call by repeatedly calling it's methods.
|
||||
Using [method builders](https://docs.rs/google-cloudsupport2_beta/5.0.5+20240416/google_cloudsupport2_beta/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-cloudsupport2_beta/5.0.4+20240304/google_cloudsupport2_beta/client::RequestValue) are moved
|
||||
* [request values](https://docs.rs/google-cloudsupport2_beta/5.0.5+20240416/google_cloudsupport2_beta/client::RequestValue) are moved
|
||||
|
||||
Arguments will always be copied or cloned into the builder, to make them independent of their original life times.
|
||||
|
||||
@@ -194,7 +194,7 @@ Arguments will always be copied or cloned into the builder, to make them indepen
|
||||
[google-go-api]: https://github.com/google/google-api-go-client
|
||||
|
||||
# License
|
||||
The **cloudsupport2_beta** library was generated by Sebastian Thiel, and is placed
|
||||
The **cloudsupport2_beta** 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].
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
556
gen/cloudsupport2_beta/src/api/enums.rs
Normal file
556
gen/cloudsupport2_beta/src/api/enums.rs
Normal file
@@ -0,0 +1,556 @@
|
||||
use super::*;
|
||||
|
||||
|
||||
|
||||
// region CasePriorityEnum
|
||||
#[derive(Clone, Copy, Eq, Hash, Debug, PartialEq, Serialize, Deserialize)]
|
||||
/// The priority of this case.
|
||||
pub enum CasePriorityEnum {
|
||||
|
||||
|
||||
/// Priority is undefined or has not been set yet.
|
||||
///
|
||||
/// "PRIORITY_UNSPECIFIED"
|
||||
#[serde(rename="PRIORITY_UNSPECIFIED")]
|
||||
PRIORITYUNSPECIFIED,
|
||||
|
||||
|
||||
/// Extreme impact on a production service. Service is hard down.
|
||||
///
|
||||
/// "P0"
|
||||
#[serde(rename="P0")]
|
||||
P0,
|
||||
|
||||
|
||||
/// Critical impact on a production service. Service is currently unusable.
|
||||
///
|
||||
/// "P1"
|
||||
#[serde(rename="P1")]
|
||||
P1,
|
||||
|
||||
|
||||
/// Severe impact on a production service. Service is usable but greatly impaired.
|
||||
///
|
||||
/// "P2"
|
||||
#[serde(rename="P2")]
|
||||
P2,
|
||||
|
||||
|
||||
/// Medium impact on a production service. Service is available, but moderately impaired.
|
||||
///
|
||||
/// "P3"
|
||||
#[serde(rename="P3")]
|
||||
P3,
|
||||
|
||||
|
||||
/// General questions or minor issues. Production service is fully available.
|
||||
///
|
||||
/// "P4"
|
||||
#[serde(rename="P4")]
|
||||
P4,
|
||||
}
|
||||
|
||||
impl AsRef<str> for CasePriorityEnum {
|
||||
fn as_ref(&self) -> &str {
|
||||
match *self {
|
||||
CasePriorityEnum::PRIORITYUNSPECIFIED => "PRIORITY_UNSPECIFIED",
|
||||
CasePriorityEnum::P0 => "P0",
|
||||
CasePriorityEnum::P1 => "P1",
|
||||
CasePriorityEnum::P2 => "P2",
|
||||
CasePriorityEnum::P3 => "P3",
|
||||
CasePriorityEnum::P4 => "P4",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl std::convert::TryFrom< &str> for CasePriorityEnum {
|
||||
type Error = ();
|
||||
fn try_from(value: &str) -> Result<Self, Self::Error> {
|
||||
match value {
|
||||
"PRIORITY_UNSPECIFIED" => Ok(CasePriorityEnum::PRIORITYUNSPECIFIED),
|
||||
"P0" => Ok(CasePriorityEnum::P0),
|
||||
"P1" => Ok(CasePriorityEnum::P1),
|
||||
"P2" => Ok(CasePriorityEnum::P2),
|
||||
"P3" => Ok(CasePriorityEnum::P3),
|
||||
"P4" => Ok(CasePriorityEnum::P4),
|
||||
_=> Err(()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> Into<std::borrow::Cow<'a, str>> for &'a CasePriorityEnum {
|
||||
fn into(self) -> std::borrow::Cow<'a, str> {
|
||||
self.as_ref().into()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// endregion
|
||||
|
||||
|
||||
// region CaseSeverityEnum
|
||||
#[derive(Clone, Copy, Eq, Hash, Debug, PartialEq, Serialize, Deserialize)]
|
||||
/// REMOVED. The severity of this case. Use priority instead.
|
||||
pub enum CaseSeverityEnum {
|
||||
|
||||
|
||||
/// Severity is undefined or has not been set yet.
|
||||
///
|
||||
/// "SEVERITY_UNSPECIFIED"
|
||||
#[serde(rename="SEVERITY_UNSPECIFIED")]
|
||||
SEVERITYUNSPECIFIED,
|
||||
|
||||
|
||||
/// Extreme impact on a production service. Service is hard down.
|
||||
///
|
||||
/// "S0"
|
||||
#[serde(rename="S0")]
|
||||
S0,
|
||||
|
||||
|
||||
/// Critical impact on a production service. Service is currently unusable.
|
||||
///
|
||||
/// "S1"
|
||||
#[serde(rename="S1")]
|
||||
S1,
|
||||
|
||||
|
||||
/// Severe impact on a production service. Service is usable but greatly impaired.
|
||||
///
|
||||
/// "S2"
|
||||
#[serde(rename="S2")]
|
||||
S2,
|
||||
|
||||
|
||||
/// Medium impact on a production service. Service is available, but moderately impaired.
|
||||
///
|
||||
/// "S3"
|
||||
#[serde(rename="S3")]
|
||||
S3,
|
||||
|
||||
|
||||
/// General questions or minor issues. Production service is fully available.
|
||||
///
|
||||
/// "S4"
|
||||
#[serde(rename="S4")]
|
||||
S4,
|
||||
}
|
||||
|
||||
impl AsRef<str> for CaseSeverityEnum {
|
||||
fn as_ref(&self) -> &str {
|
||||
match *self {
|
||||
CaseSeverityEnum::SEVERITYUNSPECIFIED => "SEVERITY_UNSPECIFIED",
|
||||
CaseSeverityEnum::S0 => "S0",
|
||||
CaseSeverityEnum::S1 => "S1",
|
||||
CaseSeverityEnum::S2 => "S2",
|
||||
CaseSeverityEnum::S3 => "S3",
|
||||
CaseSeverityEnum::S4 => "S4",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl std::convert::TryFrom< &str> for CaseSeverityEnum {
|
||||
type Error = ();
|
||||
fn try_from(value: &str) -> Result<Self, Self::Error> {
|
||||
match value {
|
||||
"SEVERITY_UNSPECIFIED" => Ok(CaseSeverityEnum::SEVERITYUNSPECIFIED),
|
||||
"S0" => Ok(CaseSeverityEnum::S0),
|
||||
"S1" => Ok(CaseSeverityEnum::S1),
|
||||
"S2" => Ok(CaseSeverityEnum::S2),
|
||||
"S3" => Ok(CaseSeverityEnum::S3),
|
||||
"S4" => Ok(CaseSeverityEnum::S4),
|
||||
_=> Err(()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> Into<std::borrow::Cow<'a, str>> for &'a CaseSeverityEnum {
|
||||
fn into(self) -> std::borrow::Cow<'a, str> {
|
||||
self.as_ref().into()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// endregion
|
||||
|
||||
|
||||
// region CaseStateEnum
|
||||
#[derive(Clone, Copy, Eq, Hash, Debug, PartialEq, Serialize, Deserialize)]
|
||||
/// Output only. The current status of the support case.
|
||||
pub enum CaseStateEnum {
|
||||
|
||||
|
||||
/// Case is in an unknown state.
|
||||
///
|
||||
/// "STATE_UNSPECIFIED"
|
||||
#[serde(rename="STATE_UNSPECIFIED")]
|
||||
STATEUNSPECIFIED,
|
||||
|
||||
|
||||
/// The case has been created but no one is assigned to work on it yet.
|
||||
///
|
||||
/// "NEW"
|
||||
#[serde(rename="NEW")]
|
||||
NEW,
|
||||
|
||||
|
||||
/// The case is currently being handled by Google support.
|
||||
///
|
||||
/// "IN_PROGRESS_GOOGLE_SUPPORT"
|
||||
#[serde(rename="IN_PROGRESS_GOOGLE_SUPPORT")]
|
||||
INPROGRESSGOOGLESUPPORT,
|
||||
|
||||
|
||||
/// Google is waiting for a response.
|
||||
///
|
||||
/// "ACTION_REQUIRED"
|
||||
#[serde(rename="ACTION_REQUIRED")]
|
||||
ACTIONREQUIRED,
|
||||
|
||||
|
||||
/// A solution has been offered for the case, but it isn't yet closed.
|
||||
///
|
||||
/// "SOLUTION_PROVIDED"
|
||||
#[serde(rename="SOLUTION_PROVIDED")]
|
||||
SOLUTIONPROVIDED,
|
||||
|
||||
|
||||
/// The case has been resolved.
|
||||
///
|
||||
/// "CLOSED"
|
||||
#[serde(rename="CLOSED")]
|
||||
CLOSED,
|
||||
}
|
||||
|
||||
impl AsRef<str> for CaseStateEnum {
|
||||
fn as_ref(&self) -> &str {
|
||||
match *self {
|
||||
CaseStateEnum::STATEUNSPECIFIED => "STATE_UNSPECIFIED",
|
||||
CaseStateEnum::NEW => "NEW",
|
||||
CaseStateEnum::INPROGRESSGOOGLESUPPORT => "IN_PROGRESS_GOOGLE_SUPPORT",
|
||||
CaseStateEnum::ACTIONREQUIRED => "ACTION_REQUIRED",
|
||||
CaseStateEnum::SOLUTIONPROVIDED => "SOLUTION_PROVIDED",
|
||||
CaseStateEnum::CLOSED => "CLOSED",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl std::convert::TryFrom< &str> for CaseStateEnum {
|
||||
type Error = ();
|
||||
fn try_from(value: &str) -> Result<Self, Self::Error> {
|
||||
match value {
|
||||
"STATE_UNSPECIFIED" => Ok(CaseStateEnum::STATEUNSPECIFIED),
|
||||
"NEW" => Ok(CaseStateEnum::NEW),
|
||||
"IN_PROGRESS_GOOGLE_SUPPORT" => Ok(CaseStateEnum::INPROGRESSGOOGLESUPPORT),
|
||||
"ACTION_REQUIRED" => Ok(CaseStateEnum::ACTIONREQUIRED),
|
||||
"SOLUTION_PROVIDED" => Ok(CaseStateEnum::SOLUTIONPROVIDED),
|
||||
"CLOSED" => Ok(CaseStateEnum::CLOSED),
|
||||
_=> Err(()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> Into<std::borrow::Cow<'a, str>> for &'a CaseStateEnum {
|
||||
fn into(self) -> std::borrow::Cow<'a, str> {
|
||||
self.as_ref().into()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// endregion
|
||||
|
||||
|
||||
// region CompositeMediaReferenceTypeEnum
|
||||
#[derive(Clone, Copy, Eq, Hash, Debug, PartialEq, Serialize, Deserialize)]
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
pub enum CompositeMediaReferenceTypeEnum {
|
||||
|
||||
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
///
|
||||
/// "PATH"
|
||||
#[serde(rename="PATH")]
|
||||
PATH,
|
||||
|
||||
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
///
|
||||
/// "BLOB_REF"
|
||||
#[serde(rename="BLOB_REF")]
|
||||
BLOBREF,
|
||||
|
||||
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
///
|
||||
/// "INLINE"
|
||||
#[serde(rename="INLINE")]
|
||||
INLINE,
|
||||
|
||||
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
///
|
||||
/// "BIGSTORE_REF"
|
||||
#[serde(rename="BIGSTORE_REF")]
|
||||
BIGSTOREREF,
|
||||
|
||||
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
///
|
||||
/// "COSMO_BINARY_REFERENCE"
|
||||
#[serde(rename="COSMO_BINARY_REFERENCE")]
|
||||
COSMOBINARYREFERENCE,
|
||||
}
|
||||
|
||||
impl AsRef<str> for CompositeMediaReferenceTypeEnum {
|
||||
fn as_ref(&self) -> &str {
|
||||
match *self {
|
||||
CompositeMediaReferenceTypeEnum::PATH => "PATH",
|
||||
CompositeMediaReferenceTypeEnum::BLOBREF => "BLOB_REF",
|
||||
CompositeMediaReferenceTypeEnum::INLINE => "INLINE",
|
||||
CompositeMediaReferenceTypeEnum::BIGSTOREREF => "BIGSTORE_REF",
|
||||
CompositeMediaReferenceTypeEnum::COSMOBINARYREFERENCE => "COSMO_BINARY_REFERENCE",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl std::convert::TryFrom< &str> for CompositeMediaReferenceTypeEnum {
|
||||
type Error = ();
|
||||
fn try_from(value: &str) -> Result<Self, Self::Error> {
|
||||
match value {
|
||||
"PATH" => Ok(CompositeMediaReferenceTypeEnum::PATH),
|
||||
"BLOB_REF" => Ok(CompositeMediaReferenceTypeEnum::BLOBREF),
|
||||
"INLINE" => Ok(CompositeMediaReferenceTypeEnum::INLINE),
|
||||
"BIGSTORE_REF" => Ok(CompositeMediaReferenceTypeEnum::BIGSTOREREF),
|
||||
"COSMO_BINARY_REFERENCE" => Ok(CompositeMediaReferenceTypeEnum::COSMOBINARYREFERENCE),
|
||||
_=> Err(()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> Into<std::borrow::Cow<'a, str>> for &'a CompositeMediaReferenceTypeEnum {
|
||||
fn into(self) -> std::borrow::Cow<'a, str> {
|
||||
self.as_ref().into()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// endregion
|
||||
|
||||
|
||||
// region EscalationReasonEnum
|
||||
#[derive(Clone, Copy, Eq, Hash, Debug, PartialEq, Serialize, Deserialize)]
|
||||
/// Required. The reason why the Case is being escalated.
|
||||
pub enum EscalationReasonEnum {
|
||||
|
||||
|
||||
/// The escalation reason is in an unknown state or has not been specified.
|
||||
///
|
||||
/// "REASON_UNSPECIFIED"
|
||||
#[serde(rename="REASON_UNSPECIFIED")]
|
||||
REASONUNSPECIFIED,
|
||||
|
||||
|
||||
/// The case is taking too long to resolve.
|
||||
///
|
||||
/// "RESOLUTION_TIME"
|
||||
#[serde(rename="RESOLUTION_TIME")]
|
||||
RESOLUTIONTIME,
|
||||
|
||||
|
||||
/// The support agent does not have the expertise required to successfully resolve the issue.
|
||||
///
|
||||
/// "TECHNICAL_EXPERTISE"
|
||||
#[serde(rename="TECHNICAL_EXPERTISE")]
|
||||
TECHNICALEXPERTISE,
|
||||
|
||||
|
||||
/// The issue is having a significant business impact.
|
||||
///
|
||||
/// "BUSINESS_IMPACT"
|
||||
#[serde(rename="BUSINESS_IMPACT")]
|
||||
BUSINESSIMPACT,
|
||||
}
|
||||
|
||||
impl AsRef<str> for EscalationReasonEnum {
|
||||
fn as_ref(&self) -> &str {
|
||||
match *self {
|
||||
EscalationReasonEnum::REASONUNSPECIFIED => "REASON_UNSPECIFIED",
|
||||
EscalationReasonEnum::RESOLUTIONTIME => "RESOLUTION_TIME",
|
||||
EscalationReasonEnum::TECHNICALEXPERTISE => "TECHNICAL_EXPERTISE",
|
||||
EscalationReasonEnum::BUSINESSIMPACT => "BUSINESS_IMPACT",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl std::convert::TryFrom< &str> for EscalationReasonEnum {
|
||||
type Error = ();
|
||||
fn try_from(value: &str) -> Result<Self, Self::Error> {
|
||||
match value {
|
||||
"REASON_UNSPECIFIED" => Ok(EscalationReasonEnum::REASONUNSPECIFIED),
|
||||
"RESOLUTION_TIME" => Ok(EscalationReasonEnum::RESOLUTIONTIME),
|
||||
"TECHNICAL_EXPERTISE" => Ok(EscalationReasonEnum::TECHNICALEXPERTISE),
|
||||
"BUSINESS_IMPACT" => Ok(EscalationReasonEnum::BUSINESSIMPACT),
|
||||
_=> Err(()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> Into<std::borrow::Cow<'a, str>> for &'a EscalationReasonEnum {
|
||||
fn into(self) -> std::borrow::Cow<'a, str> {
|
||||
self.as_ref().into()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// endregion
|
||||
|
||||
|
||||
// region MediaReferenceTypeEnum
|
||||
#[derive(Clone, Copy, Eq, Hash, Debug, PartialEq, Serialize, Deserialize)]
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
pub enum MediaReferenceTypeEnum {
|
||||
|
||||
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
///
|
||||
/// "PATH"
|
||||
#[serde(rename="PATH")]
|
||||
PATH,
|
||||
|
||||
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
///
|
||||
/// "BLOB_REF"
|
||||
#[serde(rename="BLOB_REF")]
|
||||
BLOBREF,
|
||||
|
||||
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
///
|
||||
/// "INLINE"
|
||||
#[serde(rename="INLINE")]
|
||||
INLINE,
|
||||
|
||||
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
///
|
||||
/// "GET_MEDIA"
|
||||
#[serde(rename="GET_MEDIA")]
|
||||
GETMEDIA,
|
||||
|
||||
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
///
|
||||
/// "COMPOSITE_MEDIA"
|
||||
#[serde(rename="COMPOSITE_MEDIA")]
|
||||
COMPOSITEMEDIA,
|
||||
|
||||
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
///
|
||||
/// "BIGSTORE_REF"
|
||||
#[serde(rename="BIGSTORE_REF")]
|
||||
BIGSTOREREF,
|
||||
|
||||
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
///
|
||||
/// "DIFF_VERSION_RESPONSE"
|
||||
#[serde(rename="DIFF_VERSION_RESPONSE")]
|
||||
DIFFVERSIONRESPONSE,
|
||||
|
||||
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
///
|
||||
/// "DIFF_CHECKSUMS_RESPONSE"
|
||||
#[serde(rename="DIFF_CHECKSUMS_RESPONSE")]
|
||||
DIFFCHECKSUMSRESPONSE,
|
||||
|
||||
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
///
|
||||
/// "DIFF_DOWNLOAD_RESPONSE"
|
||||
#[serde(rename="DIFF_DOWNLOAD_RESPONSE")]
|
||||
DIFFDOWNLOADRESPONSE,
|
||||
|
||||
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
///
|
||||
/// "DIFF_UPLOAD_REQUEST"
|
||||
#[serde(rename="DIFF_UPLOAD_REQUEST")]
|
||||
DIFFUPLOADREQUEST,
|
||||
|
||||
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
///
|
||||
/// "DIFF_UPLOAD_RESPONSE"
|
||||
#[serde(rename="DIFF_UPLOAD_RESPONSE")]
|
||||
DIFFUPLOADRESPONSE,
|
||||
|
||||
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
///
|
||||
/// "COSMO_BINARY_REFERENCE"
|
||||
#[serde(rename="COSMO_BINARY_REFERENCE")]
|
||||
COSMOBINARYREFERENCE,
|
||||
|
||||
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
///
|
||||
/// "ARBITRARY_BYTES"
|
||||
#[serde(rename="ARBITRARY_BYTES")]
|
||||
ARBITRARYBYTES,
|
||||
}
|
||||
|
||||
impl AsRef<str> for MediaReferenceTypeEnum {
|
||||
fn as_ref(&self) -> &str {
|
||||
match *self {
|
||||
MediaReferenceTypeEnum::PATH => "PATH",
|
||||
MediaReferenceTypeEnum::BLOBREF => "BLOB_REF",
|
||||
MediaReferenceTypeEnum::INLINE => "INLINE",
|
||||
MediaReferenceTypeEnum::GETMEDIA => "GET_MEDIA",
|
||||
MediaReferenceTypeEnum::COMPOSITEMEDIA => "COMPOSITE_MEDIA",
|
||||
MediaReferenceTypeEnum::BIGSTOREREF => "BIGSTORE_REF",
|
||||
MediaReferenceTypeEnum::DIFFVERSIONRESPONSE => "DIFF_VERSION_RESPONSE",
|
||||
MediaReferenceTypeEnum::DIFFCHECKSUMSRESPONSE => "DIFF_CHECKSUMS_RESPONSE",
|
||||
MediaReferenceTypeEnum::DIFFDOWNLOADRESPONSE => "DIFF_DOWNLOAD_RESPONSE",
|
||||
MediaReferenceTypeEnum::DIFFUPLOADREQUEST => "DIFF_UPLOAD_REQUEST",
|
||||
MediaReferenceTypeEnum::DIFFUPLOADRESPONSE => "DIFF_UPLOAD_RESPONSE",
|
||||
MediaReferenceTypeEnum::COSMOBINARYREFERENCE => "COSMO_BINARY_REFERENCE",
|
||||
MediaReferenceTypeEnum::ARBITRARYBYTES => "ARBITRARY_BYTES",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl std::convert::TryFrom< &str> for MediaReferenceTypeEnum {
|
||||
type Error = ();
|
||||
fn try_from(value: &str) -> Result<Self, Self::Error> {
|
||||
match value {
|
||||
"PATH" => Ok(MediaReferenceTypeEnum::PATH),
|
||||
"BLOB_REF" => Ok(MediaReferenceTypeEnum::BLOBREF),
|
||||
"INLINE" => Ok(MediaReferenceTypeEnum::INLINE),
|
||||
"GET_MEDIA" => Ok(MediaReferenceTypeEnum::GETMEDIA),
|
||||
"COMPOSITE_MEDIA" => Ok(MediaReferenceTypeEnum::COMPOSITEMEDIA),
|
||||
"BIGSTORE_REF" => Ok(MediaReferenceTypeEnum::BIGSTOREREF),
|
||||
"DIFF_VERSION_RESPONSE" => Ok(MediaReferenceTypeEnum::DIFFVERSIONRESPONSE),
|
||||
"DIFF_CHECKSUMS_RESPONSE" => Ok(MediaReferenceTypeEnum::DIFFCHECKSUMSRESPONSE),
|
||||
"DIFF_DOWNLOAD_RESPONSE" => Ok(MediaReferenceTypeEnum::DIFFDOWNLOADRESPONSE),
|
||||
"DIFF_UPLOAD_REQUEST" => Ok(MediaReferenceTypeEnum::DIFFUPLOADREQUEST),
|
||||
"DIFF_UPLOAD_RESPONSE" => Ok(MediaReferenceTypeEnum::DIFFUPLOADRESPONSE),
|
||||
"COSMO_BINARY_REFERENCE" => Ok(MediaReferenceTypeEnum::COSMOBINARYREFERENCE),
|
||||
"ARBITRARY_BYTES" => Ok(MediaReferenceTypeEnum::ARBITRARYBYTES),
|
||||
_=> Err(()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> Into<std::borrow::Cow<'a, str>> for &'a MediaReferenceTypeEnum {
|
||||
fn into(self) -> std::borrow::Cow<'a, str> {
|
||||
self.as_ref().into()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// endregion
|
||||
|
||||
|
||||
116
gen/cloudsupport2_beta/src/api/hub.rs
Normal file
116
gen/cloudsupport2_beta/src/api/hub.rs
Normal file
@@ -0,0 +1,116 @@
|
||||
use super::*;
|
||||
|
||||
/// Central instance to access all CloudSupport related resource activities
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// Instantiate a new hub
|
||||
///
|
||||
/// ```test_harness,no_run
|
||||
/// extern crate hyper;
|
||||
/// extern crate hyper_rustls;
|
||||
/// extern crate google_cloudsupport2_beta as cloudsupport2_beta;
|
||||
/// use cloudsupport2_beta::{Result, Error};
|
||||
/// use cloudsupport2_beta::api::enums::*;
|
||||
/// # async fn dox() {
|
||||
/// use std::default::Default;
|
||||
/// use cloudsupport2_beta::{CloudSupport, oauth2, hyper, hyper_rustls, chrono, FieldMask};
|
||||
///
|
||||
/// // Get an ApplicationSecret instance by some means. It contains the `client_id` and
|
||||
/// // `client_secret`, among other things.
|
||||
/// let secret: oauth2::ApplicationSecret = Default::default();
|
||||
/// // Instantiate the authenticator. It will choose a suitable authentication flow for you,
|
||||
/// // unless you replace `None` with the desired Flow.
|
||||
/// // Provide your own `AuthenticatorDelegate` to adjust the way it operates and get feedback about
|
||||
/// // what's going on. You probably want to bring in your own `TokenStorage` to persist tokens and
|
||||
/// // retrieve them from storage.
|
||||
/// let auth = oauth2::InstalledFlowAuthenticator::builder(
|
||||
/// secret,
|
||||
/// oauth2::InstalledFlowReturnMethod::HTTPRedirect,
|
||||
/// ).build().await.unwrap();
|
||||
/// let mut hub = CloudSupport::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().unwrap().https_or_http().enable_http1().build()), auth);
|
||||
/// // You can configure optional parameters by calling the respective setters at will, and
|
||||
/// // execute the final call using `doit()`.
|
||||
/// // Values shown here are possibly random and not representative !
|
||||
/// let result = hub.cases().list("parent")
|
||||
/// .page_token("takimata")
|
||||
/// .page_size(-52)
|
||||
/// .filter("duo")
|
||||
/// .doit().await;
|
||||
///
|
||||
/// match result {
|
||||
/// Err(e) => match e {
|
||||
/// // The Error enum provides details about what exactly happened.
|
||||
/// // You can also just use its `Debug`, `Display` or `Error` traits
|
||||
/// Error::HttpError(_)
|
||||
/// |Error::Io(_)
|
||||
/// |Error::MissingAPIKey
|
||||
/// |Error::MissingToken(_)
|
||||
/// |Error::Cancelled
|
||||
/// |Error::UploadSizeLimitExceeded(_, _)
|
||||
/// |Error::Failure(_)
|
||||
/// |Error::BadRequest(_)
|
||||
/// |Error::FieldClash(_)
|
||||
/// |Error::JsonDecodeError(_, _) => println!("{}", e),
|
||||
/// },
|
||||
/// Ok(res) => println!("Success: {:?}", res),
|
||||
/// }
|
||||
/// # }
|
||||
/// ```
|
||||
#[derive(Clone)]
|
||||
pub struct CloudSupport<S> {
|
||||
pub client: hyper::Client<S, hyper::body::Body>,
|
||||
pub auth: Box<dyn client::GetToken>,
|
||||
pub(super) _user_agent: String,
|
||||
pub(super) _base_url: String,
|
||||
pub(super) _root_url: String,
|
||||
}
|
||||
|
||||
impl<'a, S> client::Hub for CloudSupport<S> {}
|
||||
|
||||
impl<'a, S> CloudSupport<S> {
|
||||
|
||||
pub fn new<A: 'static + client::GetToken>(client: hyper::Client<S, hyper::body::Body>, auth: A) -> CloudSupport<S> {
|
||||
CloudSupport {
|
||||
client,
|
||||
auth: Box::new(auth),
|
||||
_user_agent: "google-api-rust-client/5.0.5".to_string(),
|
||||
_base_url: "https://cloudsupport.googleapis.com/".to_string(),
|
||||
_root_url: "https://cloudsupport.googleapis.com/".to_string(),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn case_classifications(&'a self) -> CaseClassificationMethods<'a, S> {
|
||||
CaseClassificationMethods { hub: &self }
|
||||
}
|
||||
pub fn cases(&'a self) -> CaseMethods<'a, S> {
|
||||
CaseMethods { hub: &self }
|
||||
}
|
||||
pub fn media(&'a self) -> MediaMethods<'a, S> {
|
||||
MediaMethods { hub: &self }
|
||||
}
|
||||
|
||||
/// Set the user-agent header field to use in all requests to the server.
|
||||
/// It defaults to `google-api-rust-client/5.0.5`.
|
||||
///
|
||||
/// Returns the previously set user-agent.
|
||||
pub fn user_agent(&mut self, agent_name: String) -> String {
|
||||
mem::replace(&mut self._user_agent, agent_name)
|
||||
}
|
||||
|
||||
/// Set the base url to use in all requests to the server.
|
||||
/// It defaults to `https://cloudsupport.googleapis.com/`.
|
||||
///
|
||||
/// Returns the previously set base url.
|
||||
pub fn base_url(&mut self, new_base_url: String) -> String {
|
||||
mem::replace(&mut self._base_url, new_base_url)
|
||||
}
|
||||
|
||||
/// Set the root url to use in all requests to the server.
|
||||
/// It defaults to `https://cloudsupport.googleapis.com/`.
|
||||
///
|
||||
/// Returns the previously set root url.
|
||||
pub fn root_url(&mut self, new_root_url: String) -> String {
|
||||
mem::replace(&mut self._root_url, new_root_url)
|
||||
}
|
||||
}
|
||||
362
gen/cloudsupport2_beta/src/api/method_builders.rs
Normal file
362
gen/cloudsupport2_beta/src/api/method_builders.rs
Normal file
@@ -0,0 +1,362 @@
|
||||
use super::*;
|
||||
/// A builder providing access to all methods supported on *caseClassification* resources.
|
||||
/// It is not used directly, but through the [`CloudSupport`] hub.
|
||||
///
|
||||
/// # Example
|
||||
///
|
||||
/// Instantiate a resource builder
|
||||
///
|
||||
/// ```test_harness,no_run
|
||||
/// extern crate hyper;
|
||||
/// extern crate hyper_rustls;
|
||||
/// extern crate google_cloudsupport2_beta as cloudsupport2_beta;
|
||||
///
|
||||
/// # async fn dox() {
|
||||
/// use std::default::Default;
|
||||
/// use cloudsupport2_beta::{CloudSupport, oauth2, hyper, hyper_rustls, chrono, FieldMask};
|
||||
///
|
||||
/// let secret: oauth2::ApplicationSecret = Default::default();
|
||||
/// let auth = oauth2::InstalledFlowAuthenticator::builder(
|
||||
/// secret,
|
||||
/// oauth2::InstalledFlowReturnMethod::HTTPRedirect,
|
||||
/// ).build().await.unwrap();
|
||||
/// let mut hub = CloudSupport::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().unwrap().https_or_http().enable_http1().build()), auth);
|
||||
/// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders*
|
||||
/// // like `search(...)`
|
||||
/// // to build up your call.
|
||||
/// let rb = hub.case_classifications();
|
||||
/// # }
|
||||
/// ```
|
||||
pub struct CaseClassificationMethods<'a, S>
|
||||
where S: 'a {
|
||||
|
||||
pub(super) hub: &'a CloudSupport<S>,
|
||||
}
|
||||
|
||||
impl<'a, S> client::MethodsBuilder for CaseClassificationMethods<'a, S> {}
|
||||
|
||||
impl<'a, S> CaseClassificationMethods<'a, S> {
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Retrieve valid classifications to use when creating a support case. Classifications are hierarchical. Each classification is a string containing all levels of the hierarchy separated by `" > "`. For example, `"Technical Issue > Compute > Compute Engine"`. Classification IDs returned by this endpoint are valid for at least six months. When a classification is deactivated, this endpoint immediately stops returning it. After six months, `case.create` requests using the classification will fail. EXAMPLES: cURL: ```shell curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ 'https://cloudsupport.googleapis.com/v2/caseClassifications:search?query=display_name:"*Compute%20Engine*"' ``` Python: ```python import googleapiclient.discovery supportApiService = googleapiclient.discovery.build( serviceName="cloudsupport", version="v2", discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version=v2", ) request = supportApiService.caseClassifications().search( query='display_name:"*Compute Engine*"' ) print(request.execute()) ```
|
||||
pub fn search(&self) -> CaseClassificationSearchCall<'a, S> {
|
||||
CaseClassificationSearchCall {
|
||||
hub: self.hub,
|
||||
_query: Default::default(),
|
||||
_page_token: Default::default(),
|
||||
_page_size: Default::default(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// A builder providing access to all methods supported on *case* resources.
|
||||
/// It is not used directly, but through the [`CloudSupport`] hub.
|
||||
///
|
||||
/// # Example
|
||||
///
|
||||
/// Instantiate a resource builder
|
||||
///
|
||||
/// ```test_harness,no_run
|
||||
/// extern crate hyper;
|
||||
/// extern crate hyper_rustls;
|
||||
/// extern crate google_cloudsupport2_beta as cloudsupport2_beta;
|
||||
///
|
||||
/// # async fn dox() {
|
||||
/// use std::default::Default;
|
||||
/// use cloudsupport2_beta::{CloudSupport, oauth2, hyper, hyper_rustls, chrono, FieldMask};
|
||||
///
|
||||
/// let secret: oauth2::ApplicationSecret = Default::default();
|
||||
/// let auth = oauth2::InstalledFlowAuthenticator::builder(
|
||||
/// secret,
|
||||
/// oauth2::InstalledFlowReturnMethod::HTTPRedirect,
|
||||
/// ).build().await.unwrap();
|
||||
/// let mut hub = CloudSupport::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().unwrap().https_or_http().enable_http1().build()), auth);
|
||||
/// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders*
|
||||
/// // like `attachments_list(...)`, `close(...)`, `comments_create(...)`, `comments_list(...)`, `create(...)`, `escalate(...)`, `get(...)`, `list(...)`, `patch(...)` and `search(...)`
|
||||
/// // to build up your call.
|
||||
/// let rb = hub.cases();
|
||||
/// # }
|
||||
/// ```
|
||||
pub struct CaseMethods<'a, S>
|
||||
where S: 'a {
|
||||
|
||||
pub(super) hub: &'a CloudSupport<S>,
|
||||
}
|
||||
|
||||
impl<'a, S> client::MethodsBuilder for CaseMethods<'a, S> {}
|
||||
|
||||
impl<'a, S> CaseMethods<'a, S> {
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// List all the attachments associated with a support case. EXAMPLES: cURL: ```shell case="projects/some-project/cases/23598314" curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2/$case/attachments" ``` Python: ```python import googleapiclient.discovery api_version = "v2" supportApiService = googleapiclient.discovery.build( serviceName="cloudsupport", version=api_version, discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", ) request = ( supportApiService.cases() .attachments() .list(parent="projects/some-project/cases/43595344") ) print(request.execute()) ```
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `parent` - Required. The name of the case for which attachments should be listed.
|
||||
pub fn attachments_list(&self, parent: &str) -> CaseAttachmentListCall<'a, S> {
|
||||
CaseAttachmentListCall {
|
||||
hub: self.hub,
|
||||
_parent: parent.to_string(),
|
||||
_page_token: Default::default(),
|
||||
_page_size: Default::default(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Add a new comment to a case. The comment must have the following fields set: `body`. EXAMPLES: cURL: ```shell case="projects/some-project/cases/43591344" curl \ --request POST \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ --header 'Content-Type: application/json' \ --data '{ "body": "This is a test comment." }' \ "https://cloudsupport.googleapis.com/v2/$case/comments" ``` Python: ```python import googleapiclient.discovery api_version = "v2" supportApiService = googleapiclient.discovery.build( serviceName="cloudsupport", version=api_version, discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", ) request = ( supportApiService.cases() .comments() .create( parent="projects/some-project/cases/43595344", body={"body": "This is a test comment."}, ) ) print(request.execute()) ```
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `request` - No description provided.
|
||||
/// * `parent` - Required. The name of the case to which the comment should be added.
|
||||
pub fn comments_create(&self, request: Comment, parent: &str) -> CaseCommentCreateCall<'a, S> {
|
||||
CaseCommentCreateCall {
|
||||
hub: self.hub,
|
||||
_request: request,
|
||||
_parent: parent.to_string(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// List all the comments associated with a case. EXAMPLES: cURL: ```shell case="projects/some-project/cases/43595344" curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2/$case/comments" ``` Python: ```python import googleapiclient.discovery api_version = "v2" supportApiService = googleapiclient.discovery.build( serviceName="cloudsupport", version=api_version, discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", ) request = ( supportApiService.cases() .comments() .list(parent="projects/some-project/cases/43595344") ) print(request.execute()) ```
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `parent` - Required. The name of the case for which to list comments.
|
||||
pub fn comments_list(&self, parent: &str) -> CaseCommentListCall<'a, S> {
|
||||
CaseCommentListCall {
|
||||
hub: self.hub,
|
||||
_parent: parent.to_string(),
|
||||
_page_token: Default::default(),
|
||||
_page_size: Default::default(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Close a case. EXAMPLES: cURL: ```shell case="projects/some-project/cases/43595344" curl \ --request POST \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2/$case:close" ``` Python: ```python import googleapiclient.discovery api_version = "v2" supportApiService = googleapiclient.discovery.build( serviceName="cloudsupport", version=api_version, discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", ) request = supportApiService.cases().close( name="projects/some-project/cases/43595344" ) print(request.execute()) ```
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `request` - No description provided.
|
||||
/// * `name` - Required. The name of the case to close.
|
||||
pub fn close(&self, request: CloseCaseRequest, name: &str) -> CaseCloseCall<'a, S> {
|
||||
CaseCloseCall {
|
||||
hub: self.hub,
|
||||
_request: request,
|
||||
_name: name.to_string(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Create a new case and associate it with a parent. It must have the following fields set: `display_name`, `description`, `classification`, and `priority`. If you're just testing the API and don't want to route your case to an agent, set `testCase=true`. EXAMPLES: cURL: ```shell parent="projects/some-project" curl \ --request POST \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ --header 'Content-Type: application/json' \ --data '{ "display_name": "Test case created by me.", "description": "a random test case, feel free to close", "classification": { "id": "100IK2AKCLHMGRJ9CDGMOCGP8DM6UTB4BT262T31BT1M2T31DHNMENPO6KS36CPJ786L2TBFEHGN6NPI64R3CDHN8880G08I1H3MURR7DHII0GRCDTQM8" }, "time_zone": "-07:00", "subscriber_email_addresses": [ "foo@domain.com", "bar@domain.com" ], "testCase": true, "priority": "P3" }' \ "https://cloudsupport.googleapis.com/v2/$parent/cases" ``` Python: ```python import googleapiclient.discovery api_version = "v2" supportApiService = googleapiclient.discovery.build( serviceName="cloudsupport", version=api_version, discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", ) request = supportApiService.cases().create( parent="projects/some-project", body={ "displayName": "A Test Case", "description": "This is a test case.", "testCase": True, "priority": "P2", "classification": { "id": "100IK2AKCLHMGRJ9CDGMOCGP8DM6UTB4BT262T31BT1M2T31DHNMENPO6KS36CPJ786L2TBFEHGN6NPI64R3CDHN8880G08I1H3MURR7DHII0GRCDTQM8" }, }, ) print(request.execute()) ```
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `request` - No description provided.
|
||||
/// * `parent` - Required. The name of the parent under which the case should be created.
|
||||
pub fn create(&self, request: Case, parent: &str) -> CaseCreateCall<'a, S> {
|
||||
CaseCreateCall {
|
||||
hub: self.hub,
|
||||
_request: request,
|
||||
_parent: parent.to_string(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Escalate a case, starting the Google Cloud Support escalation management process. This operation is only available for some support services. Go to https://cloud.google.com/support and look for 'Technical support escalations' in the feature list to find out which ones let you do that. EXAMPLES: cURL: ```shell case="projects/some-project/cases/43595344" curl \ --request POST \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ --header "Content-Type: application/json" \ --data '{ "escalation": { "reason": "BUSINESS_IMPACT", "justification": "This is a test escalation." } }' \ "https://cloudsupport.googleapis.com/v2/$case:escalate" ``` Python: ```python import googleapiclient.discovery api_version = "v2" supportApiService = googleapiclient.discovery.build( serviceName="cloudsupport", version=api_version, discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", ) request = supportApiService.cases().escalate( name="projects/some-project/cases/43595344", body={ "escalation": { "reason": "BUSINESS_IMPACT", "justification": "This is a test escalation.", }, }, ) print(request.execute()) ```
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `request` - No description provided.
|
||||
/// * `name` - Required. The name of the case to be escalated.
|
||||
pub fn escalate(&self, request: EscalateCaseRequest, name: &str) -> CaseEscalateCall<'a, S> {
|
||||
CaseEscalateCall {
|
||||
hub: self.hub,
|
||||
_request: request,
|
||||
_name: name.to_string(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Retrieve a case. EXAMPLES: cURL: ```shell case="projects/some-project/cases/16033687" curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2/$case" ``` Python: ```python import googleapiclient.discovery api_version = "v2" supportApiService = googleapiclient.discovery.build( serviceName="cloudsupport", version=api_version, discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", ) request = supportApiService.cases().get( name="projects/some-project/cases/43595344", ) print(request.execute()) ```
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `name` - Required. The full name of a case to be retrieved.
|
||||
pub fn get(&self, name: &str) -> CaseGetCall<'a, S> {
|
||||
CaseGetCall {
|
||||
hub: self.hub,
|
||||
_name: name.to_string(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Retrieve all cases under a parent, but not its children. For example, listing cases under an organization only returns the cases that are directly parented by that organization. To retrieve cases under an organization and its projects, use `cases.search`. EXAMPLES: cURL: ```shell parent="projects/some-project" curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2/$parent/cases" ``` Python: ```python import googleapiclient.discovery api_version = "v2" supportApiService = googleapiclient.discovery.build( serviceName="cloudsupport", version=api_version, discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", ) request = supportApiService.cases().list(parent="projects/some-project") print(request.execute()) ```
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `parent` - Required. The name of a parent to list cases under.
|
||||
pub fn list(&self, parent: &str) -> CaseListCall<'a, S> {
|
||||
CaseListCall {
|
||||
hub: self.hub,
|
||||
_parent: parent.to_string(),
|
||||
_page_token: Default::default(),
|
||||
_page_size: Default::default(),
|
||||
_filter: Default::default(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Update a case. Only some fields can be updated. EXAMPLES: cURL: ```shell case="projects/some-project/cases/43595344" curl \ --request PATCH \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ --header "Content-Type: application/json" \ --data '{ "priority": "P1" }' \ "https://cloudsupport.googleapis.com/v2/$case?updateMask=priority" ``` Python: ```python import googleapiclient.discovery api_version = "v2" supportApiService = googleapiclient.discovery.build( serviceName="cloudsupport", version=api_version, discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", ) request = supportApiService.cases().patch( name="projects/some-project/cases/43112854", body={ "displayName": "This is Now a New Title", "priority": "P2", }, ) print(request.execute()) ```
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `request` - No description provided.
|
||||
/// * `name` - The resource name for the case.
|
||||
pub fn patch(&self, request: Case, name: &str) -> CasePatchCall<'a, S> {
|
||||
CasePatchCall {
|
||||
hub: self.hub,
|
||||
_request: request,
|
||||
_name: name.to_string(),
|
||||
_update_mask: Default::default(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Search for cases using a query. EXAMPLES: cURL: ```shell parent="projects/some-project" curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2/$parent/cases:search" ``` Python: ```python import googleapiclient.discovery api_version = "v2" supportApiService = googleapiclient.discovery.build( serviceName="cloudsupport", version=api_version, discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", ) request = supportApiService.cases().search( parent="projects/some-project", query="state=OPEN" ) print(request.execute()) ```
|
||||
pub fn search(&self) -> CaseSearchCall<'a, S> {
|
||||
CaseSearchCall {
|
||||
hub: self.hub,
|
||||
_query: Default::default(),
|
||||
_parent: Default::default(),
|
||||
_page_token: Default::default(),
|
||||
_page_size: Default::default(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// A builder providing access to all methods supported on *media* resources.
|
||||
/// It is not used directly, but through the [`CloudSupport`] hub.
|
||||
///
|
||||
/// # Example
|
||||
///
|
||||
/// Instantiate a resource builder
|
||||
///
|
||||
/// ```test_harness,no_run
|
||||
/// extern crate hyper;
|
||||
/// extern crate hyper_rustls;
|
||||
/// extern crate google_cloudsupport2_beta as cloudsupport2_beta;
|
||||
///
|
||||
/// # async fn dox() {
|
||||
/// use std::default::Default;
|
||||
/// use cloudsupport2_beta::{CloudSupport, oauth2, hyper, hyper_rustls, chrono, FieldMask};
|
||||
///
|
||||
/// let secret: oauth2::ApplicationSecret = Default::default();
|
||||
/// let auth = oauth2::InstalledFlowAuthenticator::builder(
|
||||
/// secret,
|
||||
/// oauth2::InstalledFlowReturnMethod::HTTPRedirect,
|
||||
/// ).build().await.unwrap();
|
||||
/// let mut hub = CloudSupport::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().unwrap().https_or_http().enable_http1().build()), auth);
|
||||
/// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders*
|
||||
/// // like `download(...)` and `upload(...)`
|
||||
/// // to build up your call.
|
||||
/// let rb = hub.media();
|
||||
/// # }
|
||||
/// ```
|
||||
pub struct MediaMethods<'a, S>
|
||||
where S: 'a {
|
||||
|
||||
pub(super) hub: &'a CloudSupport<S>,
|
||||
}
|
||||
|
||||
impl<'a, S> client::MethodsBuilder for MediaMethods<'a, S> {}
|
||||
|
||||
impl<'a, S> MediaMethods<'a, S> {
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Download a file attached to a case. Note: HTTP requests must append "?alt=media" to the URL. EXAMPLES: cURL: ```shell name="projects/some-project/cases/43594844/attachments/0674M00000WijAnZAJ" curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2/$name:download?alt=media" ``` Python: ```python import googleapiclient.discovery api_version = "v2" supportApiService = googleapiclient.discovery.build( serviceName="cloudsupport", version=api_version, discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", ) request = supportApiService.media().download( name="projects/some-project/cases/43595344/attachments/0684M00000Pw6pHQAR" ) request.uri = request.uri.split("?")[0] + "?alt=media" print(request.execute()) ```
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `name` - The name of the file attachment to download.
|
||||
pub fn download(&self, name: &str) -> MediaDownloadCall<'a, S> {
|
||||
MediaDownloadCall {
|
||||
hub: self.hub,
|
||||
_name: name.to_string(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Create a file attachment on a case or Cloud resource. The attachment must have the following fields set: `filename`. EXAMPLES: cURL: ```shell echo "This text is in a file I'm uploading using CSAPI." \ > "./example_file.txt" case="projects/some-project/cases/43594844" curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ --data-binary @"./example_file.txt" \ "https://cloudsupport.googleapis.com/upload/v2beta/$case/attachments?attachment.filename=uploaded_via_curl.txt" ``` Python: ```python import googleapiclient.discovery api_version = "v2" supportApiService = googleapiclient.discovery.build( serviceName="cloudsupport", version=api_version, discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", ) file_path = "./example_file.txt" with open(file_path, "w") as file: file.write( "This text is inside a file I'm going to upload using the Cloud Support API.", ) request = supportApiService.media().upload( parent="projects/some-project/cases/43595344", media_body=file_path ) request.uri = request.uri.split("?")[0] + "?attachment.filename=uploaded_via_python.txt" print(request.execute()) ```
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `request` - No description provided.
|
||||
/// * `parent` - Required. The name of the case or Cloud resource to which the attachment should be attached.
|
||||
pub fn upload(&self, request: CreateAttachmentRequest, parent: &str) -> MediaUploadCall<'a, S> {
|
||||
MediaUploadCall {
|
||||
hub: self.hub,
|
||||
_request: request,
|
||||
_parent: parent.to_string(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
35
gen/cloudsupport2_beta/src/api/mod.rs
Normal file
35
gen/cloudsupport2_beta/src/api/mod.rs
Normal file
@@ -0,0 +1,35 @@
|
||||
use std::collections::HashMap;
|
||||
use std::cell::RefCell;
|
||||
use std::default::Default;
|
||||
use std::collections::BTreeSet;
|
||||
use std::error::Error as StdError;
|
||||
use serde_json as json;
|
||||
use std::io;
|
||||
use std::fs;
|
||||
use std::mem;
|
||||
|
||||
use hyper::client::connect;
|
||||
use tokio::io::{AsyncRead, AsyncWrite};
|
||||
use tokio::time::sleep;
|
||||
use tower_service;
|
||||
use serde::{Serialize, Deserialize};
|
||||
|
||||
use crate::{client, client::GetToken, client::serde_with};
|
||||
|
||||
mod utilities;
|
||||
pub use utilities::*;
|
||||
|
||||
mod hub;
|
||||
pub use hub::*;
|
||||
|
||||
mod schemas;
|
||||
pub use schemas::*;
|
||||
|
||||
mod method_builders;
|
||||
pub use method_builders::*;
|
||||
|
||||
mod call_builders;
|
||||
pub use call_builders::*;
|
||||
|
||||
pub mod enums;
|
||||
pub(crate) use enums::*;
|
||||
815
gen/cloudsupport2_beta/src/api/schemas.rs
Normal file
815
gen/cloudsupport2_beta/src/api/schemas.rs
Normal file
@@ -0,0 +1,815 @@
|
||||
use super::*;
|
||||
/// An Actor represents an entity that performed an action. For example, an actor could be a user who posted a comment on a support case, a user who uploaded an attachment, or a service account that created a support case.
|
||||
///
|
||||
/// This type is not used in any activity, and only used as *part* of another schema.
|
||||
///
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct Actor {
|
||||
/// The name to display for the actor. If not provided, it is inferred from credentials supplied during case creation. When an email is provided, a display name must also be provided. This will be obfuscated if the user is a Google Support agent.
|
||||
#[serde(rename="displayName")]
|
||||
|
||||
pub display_name: Option<String>,
|
||||
/// The email address of the actor. If not provided, it is inferred from the credentials supplied during case creation. When a name is provided, an email must also be provided. If the user is a Google Support agent, this is obfuscated. This field is deprecated. Use **username** field instead.
|
||||
|
||||
pub email: Option<String>,
|
||||
/// Output only. Whether the actor is a Google support actor.
|
||||
#[serde(rename="googleSupport")]
|
||||
|
||||
pub google_support: Option<bool>,
|
||||
/// Output only. The username of the actor. It may look like an email or other format provided by the identity provider. If not provided, it is inferred from the credentials supplied. When a name is provided, a username must also be provided. If the user is a Google Support agent, this will not be set.
|
||||
|
||||
pub username: Option<String>,
|
||||
}
|
||||
|
||||
impl client::Part for Actor {}
|
||||
|
||||
|
||||
/// An Attachment contains metadata about a file that was uploaded to a case - it is NOT a file itself. That being said, the name of an Attachment object can be used to download its accompanying file through the `media.download` endpoint. While attachments can be uploaded in the console at the same time as a comment, they’re associated on a “case” level, not a “comment” level.
|
||||
///
|
||||
/// # 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*).
|
||||
///
|
||||
/// * [upload media](MediaUploadCall) (response)
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct Attachment {
|
||||
/// Output only. The time at which the attachment was created.
|
||||
#[serde(rename="createTime")]
|
||||
|
||||
pub create_time: Option<client::chrono::DateTime<client::chrono::offset::Utc>>,
|
||||
/// Output only. The user who uploaded the attachment. Note, the name and email will be obfuscated if the attachment was uploaded by Google support.
|
||||
|
||||
pub creator: Option<Actor>,
|
||||
/// The filename of the attachment (e.g. `"graph.jpg"`).
|
||||
|
||||
pub filename: Option<String>,
|
||||
/// Output only. The MIME type of the attachment (e.g. text/plain).
|
||||
#[serde(rename="mimeType")]
|
||||
|
||||
pub mime_type: Option<String>,
|
||||
/// Output only. The resource name of the attachment.
|
||||
|
||||
pub name: Option<String>,
|
||||
/// Output only. The size of the attachment in bytes.
|
||||
#[serde(rename="sizeBytes")]
|
||||
|
||||
#[serde_as(as = "Option<::client::serde_with::DisplayFromStr>")]
|
||||
pub size_bytes: Option<i64>,
|
||||
}
|
||||
|
||||
impl client::ResponseResult for Attachment {}
|
||||
|
||||
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
///
|
||||
/// This type is not used in any activity, and only used as *part* of another schema.
|
||||
///
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct Blobstore2Info {
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
#[serde(rename="blobGeneration")]
|
||||
|
||||
#[serde_as(as = "Option<::client::serde_with::DisplayFromStr>")]
|
||||
pub blob_generation: Option<i64>,
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
#[serde(rename="blobId")]
|
||||
|
||||
pub blob_id: Option<String>,
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
#[serde(rename="downloadReadHandle")]
|
||||
|
||||
#[serde_as(as = "Option<::client::serde::standard_base64::Wrapper>")]
|
||||
pub download_read_handle: Option<Vec<u8>>,
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
#[serde(rename="readToken")]
|
||||
|
||||
pub read_token: Option<String>,
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
#[serde(rename="uploadMetadataContainer")]
|
||||
|
||||
#[serde_as(as = "Option<::client::serde::standard_base64::Wrapper>")]
|
||||
pub upload_metadata_container: Option<Vec<u8>>,
|
||||
}
|
||||
|
||||
impl client::Part for Blobstore2Info {}
|
||||
|
||||
|
||||
/// A Case is an object that contains the details of a support case. It contains fields for the time it was created, its priority, its classification, and more. Cases can also have comments and attachments that get added over time. A case is parented by a Google Cloud organization or project. Organizations are identified by a number, so the name of a case parented by an organization would look like this: `organizations/123/cases/456` Projects have two unique identifiers, an ID and a number, and they look like this: `projects/abc/cases/456` `projects/123/cases/456` You can use either of them when calling the API. To learn more about project identifiers, see [AIP-2510](https://google.aip.dev/cloud/2510).
|
||||
///
|
||||
/// # 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*).
|
||||
///
|
||||
/// * [attachments list cases](CaseAttachmentListCall) (none)
|
||||
/// * [comments create cases](CaseCommentCreateCall) (none)
|
||||
/// * [comments list cases](CaseCommentListCall) (none)
|
||||
/// * [close cases](CaseCloseCall) (response)
|
||||
/// * [create cases](CaseCreateCall) (request|response)
|
||||
/// * [escalate cases](CaseEscalateCall) (response)
|
||||
/// * [get cases](CaseGetCall) (response)
|
||||
/// * [list cases](CaseListCall) (none)
|
||||
/// * [patch cases](CasePatchCall) (request|response)
|
||||
/// * [search cases](CaseSearchCall) (none)
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct Case {
|
||||
/// The issue classification applicable to this case.
|
||||
|
||||
pub classification: Option<CaseClassification>,
|
||||
/// A user-supplied email address to send case update notifications for. This should only be used in BYOID flows, where we cannot infer the user's email address directly from their EUCs.
|
||||
#[serde(rename="contactEmail")]
|
||||
|
||||
pub contact_email: Option<String>,
|
||||
/// Output only. The time this case was created.
|
||||
#[serde(rename="createTime")]
|
||||
|
||||
pub create_time: Option<client::chrono::DateTime<client::chrono::offset::Utc>>,
|
||||
/// The user who created the case. Note: The name and email will be obfuscated if the case was created by Google Support.
|
||||
|
||||
pub creator: Option<Actor>,
|
||||
/// A broad description of the issue.
|
||||
|
||||
pub description: Option<String>,
|
||||
/// The short summary of the issue reported in this case.
|
||||
#[serde(rename="displayName")]
|
||||
|
||||
pub display_name: Option<String>,
|
||||
/// Whether the case is currently escalated.
|
||||
|
||||
pub escalated: Option<bool>,
|
||||
/// The language the user has requested to receive support in. This should be a BCP 47 language code (e.g., `"en"`, `"zh-CN"`, `"zh-TW"`, `"ja"`, `"ko"`). If no language or an unsupported language is specified, this field defaults to English (en). Language selection during case creation may affect your available support options. For a list of supported languages and their support working hours, see: https://cloud.google.com/support/docs/language-working-hours
|
||||
#[serde(rename="languageCode")]
|
||||
|
||||
pub language_code: Option<String>,
|
||||
/// The resource name for the case.
|
||||
|
||||
pub name: Option<String>,
|
||||
/// The priority of this case.
|
||||
|
||||
pub priority: Option<CasePriorityEnum>,
|
||||
/// REMOVED. The severity of this case. Use priority instead.
|
||||
|
||||
pub severity: Option<CaseSeverityEnum>,
|
||||
/// Output only. The current status of the support case.
|
||||
|
||||
pub state: Option<CaseStateEnum>,
|
||||
/// The email addresses to receive updates on this case.
|
||||
#[serde(rename="subscriberEmailAddresses")]
|
||||
|
||||
pub subscriber_email_addresses: Option<Vec<String>>,
|
||||
/// Whether this case was created for internal API testing and should not be acted on by the support team.
|
||||
#[serde(rename="testCase")]
|
||||
|
||||
pub test_case: Option<bool>,
|
||||
/// The timezone of the user who created the support case. It should be in a format IANA recognizes: https://www.iana.org/time-zones. There is no additional validation done by the API.
|
||||
#[serde(rename="timeZone")]
|
||||
|
||||
pub time_zone: Option<String>,
|
||||
/// Output only. The time this case was last updated.
|
||||
#[serde(rename="updateTime")]
|
||||
|
||||
pub update_time: Option<client::chrono::DateTime<client::chrono::offset::Utc>>,
|
||||
}
|
||||
|
||||
impl client::RequestValue for Case {}
|
||||
impl client::Resource for Case {}
|
||||
impl client::ResponseResult for Case {}
|
||||
|
||||
|
||||
/// A Case Classification represents the topic that a case is about. It’s very important to use accurate classifications, because they’re used to route your cases to specialists who can help you. A classification always has an ID that is its unique identifier. A valid ID is required when creating a case.
|
||||
///
|
||||
/// # 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*).
|
||||
///
|
||||
/// * [search case classifications](CaseClassificationSearchCall) (none)
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct CaseClassification {
|
||||
/// A display name for the classification. The display name is not static and can change. To uniquely and consistently identify classifications, use the `CaseClassification.id` field.
|
||||
#[serde(rename="displayName")]
|
||||
|
||||
pub display_name: Option<String>,
|
||||
/// The unique ID for a classification. Must be specified for case creation. To retrieve valid classification IDs for case creation, use `caseClassifications.search`. Classification IDs returned by `caseClassifications.search` are guaranteed to be valid for at least 6 months. If a given classification is deactiveated, it will immediately stop being returned. After 6 months, `case.create` requests using the classification ID will fail.
|
||||
|
||||
pub id: Option<String>,
|
||||
}
|
||||
|
||||
impl client::Resource for CaseClassification {}
|
||||
|
||||
|
||||
/// The request message for the CloseCase endpoint.
|
||||
///
|
||||
/// # 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*).
|
||||
///
|
||||
/// * [close cases](CaseCloseCall) (request)
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct CloseCaseRequest { _never_set: Option<bool> }
|
||||
|
||||
impl client::RequestValue for CloseCaseRequest {}
|
||||
|
||||
|
||||
/// A comment associated with a support case. Case comments are the primary way for Google Support to communicate with a user who has opened a case. When a user responds to Google Support, the user’s responses also appear as comments.
|
||||
///
|
||||
/// # 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*).
|
||||
///
|
||||
/// * [comments create cases](CaseCommentCreateCall) (request|response)
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct Comment {
|
||||
/// The full comment body. Maximum of 12800 characters.
|
||||
|
||||
pub body: Option<String>,
|
||||
/// Output only. The time when the comment was created.
|
||||
#[serde(rename="createTime")]
|
||||
|
||||
pub create_time: Option<client::chrono::DateTime<client::chrono::offset::Utc>>,
|
||||
/// Output only. The user or Google Support agent who created the comment.
|
||||
|
||||
pub creator: Option<Actor>,
|
||||
/// Output only. Identifier. The resource name of the comment.
|
||||
|
||||
pub name: Option<String>,
|
||||
/// Output only. DEPRECATED. DO NOT USE. A duplicate of the `body` field. This field is only present for legacy reasons.
|
||||
#[serde(rename="plainTextBody")]
|
||||
|
||||
pub plain_text_body: Option<String>,
|
||||
}
|
||||
|
||||
impl client::RequestValue for Comment {}
|
||||
impl client::ResponseResult for Comment {}
|
||||
|
||||
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
///
|
||||
/// This type is not used in any activity, and only used as *part* of another schema.
|
||||
///
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct CompositeMedia {
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
#[serde(rename="blobRef")]
|
||||
|
||||
#[serde_as(as = "Option<::client::serde::standard_base64::Wrapper>")]
|
||||
pub blob_ref: Option<Vec<u8>>,
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
#[serde(rename="blobstore2Info")]
|
||||
|
||||
pub blobstore2_info: Option<Blobstore2Info>,
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
#[serde(rename="cosmoBinaryReference")]
|
||||
|
||||
#[serde_as(as = "Option<::client::serde::standard_base64::Wrapper>")]
|
||||
pub cosmo_binary_reference: Option<Vec<u8>>,
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
#[serde(rename="crc32cHash")]
|
||||
|
||||
pub crc32c_hash: Option<u32>,
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
|
||||
#[serde_as(as = "Option<::client::serde::standard_base64::Wrapper>")]
|
||||
pub inline: Option<Vec<u8>>,
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
|
||||
#[serde_as(as = "Option<::client::serde_with::DisplayFromStr>")]
|
||||
pub length: Option<i64>,
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
#[serde(rename="md5Hash")]
|
||||
|
||||
#[serde_as(as = "Option<::client::serde::standard_base64::Wrapper>")]
|
||||
pub md5_hash: Option<Vec<u8>>,
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
#[serde(rename="objectId")]
|
||||
|
||||
pub object_id: Option<ObjectId>,
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
|
||||
pub path: Option<String>,
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
#[serde(rename="referenceType")]
|
||||
|
||||
pub reference_type: Option<CompositeMediaReferenceTypeEnum>,
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
#[serde(rename="sha1Hash")]
|
||||
|
||||
#[serde_as(as = "Option<::client::serde::standard_base64::Wrapper>")]
|
||||
pub sha1_hash: Option<Vec<u8>>,
|
||||
}
|
||||
|
||||
impl client::Part for CompositeMedia {}
|
||||
|
||||
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
///
|
||||
/// This type is not used in any activity, and only used as *part* of another schema.
|
||||
///
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct ContentTypeInfo {
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
#[serde(rename="bestGuess")]
|
||||
|
||||
pub best_guess: Option<String>,
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
#[serde(rename="fromBytes")]
|
||||
|
||||
pub from_bytes: Option<String>,
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
#[serde(rename="fromFileName")]
|
||||
|
||||
pub from_file_name: Option<String>,
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
#[serde(rename="fromHeader")]
|
||||
|
||||
pub from_header: Option<String>,
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
#[serde(rename="fromUrlPath")]
|
||||
|
||||
pub from_url_path: Option<String>,
|
||||
}
|
||||
|
||||
impl client::Part for ContentTypeInfo {}
|
||||
|
||||
|
||||
/// The request message for the CreateAttachment endpoint.
|
||||
///
|
||||
/// # 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*).
|
||||
///
|
||||
/// * [upload media](MediaUploadCall) (request)
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct CreateAttachmentRequest {
|
||||
/// Required. The attachment to be created.
|
||||
|
||||
pub attachment: Option<Attachment>,
|
||||
}
|
||||
|
||||
impl client::RequestValue for CreateAttachmentRequest {}
|
||||
|
||||
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
///
|
||||
/// This type is not used in any activity, and only used as *part* of another schema.
|
||||
///
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct DiffChecksumsResponse {
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
#[serde(rename="checksumsLocation")]
|
||||
|
||||
pub checksums_location: Option<CompositeMedia>,
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
#[serde(rename="chunkSizeBytes")]
|
||||
|
||||
#[serde_as(as = "Option<::client::serde_with::DisplayFromStr>")]
|
||||
pub chunk_size_bytes: Option<i64>,
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
#[serde(rename="objectLocation")]
|
||||
|
||||
pub object_location: Option<CompositeMedia>,
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
#[serde(rename="objectSizeBytes")]
|
||||
|
||||
#[serde_as(as = "Option<::client::serde_with::DisplayFromStr>")]
|
||||
pub object_size_bytes: Option<i64>,
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
#[serde(rename="objectVersion")]
|
||||
|
||||
pub object_version: Option<String>,
|
||||
}
|
||||
|
||||
impl client::Part for DiffChecksumsResponse {}
|
||||
|
||||
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
///
|
||||
/// This type is not used in any activity, and only used as *part* of another schema.
|
||||
///
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct DiffDownloadResponse {
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
#[serde(rename="objectLocation")]
|
||||
|
||||
pub object_location: Option<CompositeMedia>,
|
||||
}
|
||||
|
||||
impl client::Part for DiffDownloadResponse {}
|
||||
|
||||
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
///
|
||||
/// This type is not used in any activity, and only used as *part* of another schema.
|
||||
///
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct DiffUploadRequest {
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
#[serde(rename="checksumsInfo")]
|
||||
|
||||
pub checksums_info: Option<CompositeMedia>,
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
#[serde(rename="objectInfo")]
|
||||
|
||||
pub object_info: Option<CompositeMedia>,
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
#[serde(rename="objectVersion")]
|
||||
|
||||
pub object_version: Option<String>,
|
||||
}
|
||||
|
||||
impl client::Part for DiffUploadRequest {}
|
||||
|
||||
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
///
|
||||
/// This type is not used in any activity, and only used as *part* of another schema.
|
||||
///
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct DiffUploadResponse {
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
#[serde(rename="objectVersion")]
|
||||
|
||||
pub object_version: Option<String>,
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
#[serde(rename="originalObject")]
|
||||
|
||||
pub original_object: Option<CompositeMedia>,
|
||||
}
|
||||
|
||||
impl client::Part for DiffUploadResponse {}
|
||||
|
||||
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
///
|
||||
/// This type is not used in any activity, and only used as *part* of another schema.
|
||||
///
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct DiffVersionResponse {
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
#[serde(rename="objectSizeBytes")]
|
||||
|
||||
#[serde_as(as = "Option<::client::serde_with::DisplayFromStr>")]
|
||||
pub object_size_bytes: Option<i64>,
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
#[serde(rename="objectVersion")]
|
||||
|
||||
pub object_version: Option<String>,
|
||||
}
|
||||
|
||||
impl client::Part for DiffVersionResponse {}
|
||||
|
||||
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
///
|
||||
/// This type is not used in any activity, and only used as *part* of another schema.
|
||||
///
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct DownloadParameters {
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
#[serde(rename="allowGzipCompression")]
|
||||
|
||||
pub allow_gzip_compression: Option<bool>,
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
#[serde(rename="ignoreRange")]
|
||||
|
||||
pub ignore_range: Option<bool>,
|
||||
}
|
||||
|
||||
impl client::Part for DownloadParameters {}
|
||||
|
||||
|
||||
/// The request message for the EscalateCase endpoint.
|
||||
///
|
||||
/// # 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*).
|
||||
///
|
||||
/// * [escalate cases](CaseEscalateCall) (request)
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct EscalateCaseRequest {
|
||||
/// The escalation information to be sent with the escalation request.
|
||||
|
||||
pub escalation: Option<Escalation>,
|
||||
}
|
||||
|
||||
impl client::RequestValue for EscalateCaseRequest {}
|
||||
|
||||
|
||||
/// An escalation of a support case.
|
||||
///
|
||||
/// This type is not used in any activity, and only used as *part* of another schema.
|
||||
///
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct Escalation {
|
||||
/// Required. A free text description to accompany the `reason` field above. Provides additional context on why the case is being escalated.
|
||||
|
||||
pub justification: Option<String>,
|
||||
/// Required. The reason why the Case is being escalated.
|
||||
|
||||
pub reason: Option<EscalationReasonEnum>,
|
||||
}
|
||||
|
||||
impl client::Part for Escalation {}
|
||||
|
||||
|
||||
/// The response message for the ListAttachments endpoint.
|
||||
///
|
||||
/// # 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*).
|
||||
///
|
||||
/// * [attachments list cases](CaseAttachmentListCall) (response)
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct ListAttachmentsResponse {
|
||||
/// The list of attachments associated with a case.
|
||||
|
||||
pub attachments: Option<Vec<Attachment>>,
|
||||
/// A token to retrieve the next page of results. Set this in the `page_token` field of subsequent `cases.attachments.list` requests. If unspecified, there are no more results to retrieve.
|
||||
#[serde(rename="nextPageToken")]
|
||||
|
||||
pub next_page_token: Option<String>,
|
||||
}
|
||||
|
||||
impl client::ResponseResult for ListAttachmentsResponse {}
|
||||
|
||||
|
||||
/// The response message for the ListCases endpoint.
|
||||
///
|
||||
/// # 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*).
|
||||
///
|
||||
/// * [list cases](CaseListCall) (response)
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct ListCasesResponse {
|
||||
/// The list of cases associated with the parent after any filters have been applied.
|
||||
|
||||
pub cases: Option<Vec<Case>>,
|
||||
/// A token to retrieve the next page of results. Set this in the `page_token` field of subsequent `cases.list` requests. If unspecified, there are no more results to retrieve.
|
||||
#[serde(rename="nextPageToken")]
|
||||
|
||||
pub next_page_token: Option<String>,
|
||||
}
|
||||
|
||||
impl client::ResponseResult for ListCasesResponse {}
|
||||
|
||||
|
||||
/// The response message for the ListComments endpoint.
|
||||
///
|
||||
/// # 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*).
|
||||
///
|
||||
/// * [comments list cases](CaseCommentListCall) (response)
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct ListCommentsResponse {
|
||||
/// List of the comments associated with the case.
|
||||
|
||||
pub comments: Option<Vec<Comment>>,
|
||||
/// A token to retrieve the next page of results. Set this in the `page_token` field of subsequent `cases.comments.list` requests. If unspecified, there are no more results to retrieve.
|
||||
#[serde(rename="nextPageToken")]
|
||||
|
||||
pub next_page_token: Option<String>,
|
||||
}
|
||||
|
||||
impl client::ResponseResult for ListCommentsResponse {}
|
||||
|
||||
|
||||
/// # gdata.\* are outside protos with mising documentation
|
||||
///
|
||||
/// # 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*).
|
||||
///
|
||||
/// * [download media](MediaDownloadCall) (response)
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct Media {
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
|
||||
pub algorithm: Option<String>,
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
#[serde(rename="bigstoreObjectRef")]
|
||||
|
||||
#[serde_as(as = "Option<::client::serde::standard_base64::Wrapper>")]
|
||||
pub bigstore_object_ref: Option<Vec<u8>>,
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
#[serde(rename="blobRef")]
|
||||
|
||||
#[serde_as(as = "Option<::client::serde::standard_base64::Wrapper>")]
|
||||
pub blob_ref: Option<Vec<u8>>,
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
#[serde(rename="blobstore2Info")]
|
||||
|
||||
pub blobstore2_info: Option<Blobstore2Info>,
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
#[serde(rename="compositeMedia")]
|
||||
|
||||
pub composite_media: Option<Vec<CompositeMedia>>,
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
#[serde(rename="contentType")]
|
||||
|
||||
pub content_type: Option<String>,
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
#[serde(rename="contentTypeInfo")]
|
||||
|
||||
pub content_type_info: Option<ContentTypeInfo>,
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
#[serde(rename="cosmoBinaryReference")]
|
||||
|
||||
#[serde_as(as = "Option<::client::serde::standard_base64::Wrapper>")]
|
||||
pub cosmo_binary_reference: Option<Vec<u8>>,
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
#[serde(rename="crc32cHash")]
|
||||
|
||||
pub crc32c_hash: Option<u32>,
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
#[serde(rename="diffChecksumsResponse")]
|
||||
|
||||
pub diff_checksums_response: Option<DiffChecksumsResponse>,
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
#[serde(rename="diffDownloadResponse")]
|
||||
|
||||
pub diff_download_response: Option<DiffDownloadResponse>,
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
#[serde(rename="diffUploadRequest")]
|
||||
|
||||
pub diff_upload_request: Option<DiffUploadRequest>,
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
#[serde(rename="diffUploadResponse")]
|
||||
|
||||
pub diff_upload_response: Option<DiffUploadResponse>,
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
#[serde(rename="diffVersionResponse")]
|
||||
|
||||
pub diff_version_response: Option<DiffVersionResponse>,
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
#[serde(rename="downloadParameters")]
|
||||
|
||||
pub download_parameters: Option<DownloadParameters>,
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
|
||||
pub filename: Option<String>,
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
|
||||
pub hash: Option<String>,
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
#[serde(rename="hashVerified")]
|
||||
|
||||
pub hash_verified: Option<bool>,
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
|
||||
#[serde_as(as = "Option<::client::serde::standard_base64::Wrapper>")]
|
||||
pub inline: Option<Vec<u8>>,
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
#[serde(rename="isPotentialRetry")]
|
||||
|
||||
pub is_potential_retry: Option<bool>,
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
|
||||
#[serde_as(as = "Option<::client::serde_with::DisplayFromStr>")]
|
||||
pub length: Option<i64>,
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
#[serde(rename="md5Hash")]
|
||||
|
||||
#[serde_as(as = "Option<::client::serde::standard_base64::Wrapper>")]
|
||||
pub md5_hash: Option<Vec<u8>>,
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
#[serde(rename="mediaId")]
|
||||
|
||||
#[serde_as(as = "Option<::client::serde::standard_base64::Wrapper>")]
|
||||
pub media_id: Option<Vec<u8>>,
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
#[serde(rename="objectId")]
|
||||
|
||||
pub object_id: Option<ObjectId>,
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
|
||||
pub path: Option<String>,
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
#[serde(rename="referenceType")]
|
||||
|
||||
pub reference_type: Option<MediaReferenceTypeEnum>,
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
#[serde(rename="sha1Hash")]
|
||||
|
||||
#[serde_as(as = "Option<::client::serde::standard_base64::Wrapper>")]
|
||||
pub sha1_hash: Option<Vec<u8>>,
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
#[serde(rename="sha256Hash")]
|
||||
|
||||
#[serde_as(as = "Option<::client::serde::standard_base64::Wrapper>")]
|
||||
pub sha256_hash: Option<Vec<u8>>,
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
|
||||
#[serde_as(as = "Option<::client::serde_with::DisplayFromStr>")]
|
||||
pub timestamp: Option<u64>,
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
|
||||
pub token: Option<String>,
|
||||
}
|
||||
|
||||
impl client::ResponseResult for Media {}
|
||||
|
||||
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
///
|
||||
/// This type is not used in any activity, and only used as *part* of another schema.
|
||||
///
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct ObjectId {
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
#[serde(rename="bucketName")]
|
||||
|
||||
pub bucket_name: Option<String>,
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
|
||||
#[serde_as(as = "Option<::client::serde_with::DisplayFromStr>")]
|
||||
pub generation: Option<i64>,
|
||||
/// # gdata.* are outside protos with mising documentation
|
||||
#[serde(rename="objectName")]
|
||||
|
||||
pub object_name: Option<String>,
|
||||
}
|
||||
|
||||
impl client::Part for ObjectId {}
|
||||
|
||||
|
||||
/// The response message for SearchCaseClassifications endpoint.
|
||||
///
|
||||
/// # 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*).
|
||||
///
|
||||
/// * [search case classifications](CaseClassificationSearchCall) (response)
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct SearchCaseClassificationsResponse {
|
||||
/// The classifications retrieved.
|
||||
#[serde(rename="caseClassifications")]
|
||||
|
||||
pub case_classifications: Option<Vec<CaseClassification>>,
|
||||
/// A token to retrieve the next page of results. Set this in the `page_token` field of subsequent `caseClassifications.list` requests. If unspecified, there are no more results to retrieve.
|
||||
#[serde(rename="nextPageToken")]
|
||||
|
||||
pub next_page_token: Option<String>,
|
||||
}
|
||||
|
||||
impl client::ResponseResult for SearchCaseClassificationsResponse {}
|
||||
|
||||
|
||||
/// The response message for the SearchCases endpoint.
|
||||
///
|
||||
/// # 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*).
|
||||
///
|
||||
/// * [search cases](CaseSearchCall) (response)
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct SearchCasesResponse {
|
||||
/// The list of cases associated with the parent after any filters have been applied.
|
||||
|
||||
pub cases: Option<Vec<Case>>,
|
||||
/// A token to retrieve the next page of results. Set this in the `page_token` field of subsequent `cases.search` requests. If unspecified, there are no more results to retrieve.
|
||||
#[serde(rename="nextPageToken")]
|
||||
|
||||
pub next_page_token: Option<String>,
|
||||
}
|
||||
|
||||
impl client::ResponseResult for SearchCasesResponse {}
|
||||
|
||||
|
||||
24
gen/cloudsupport2_beta/src/api/utilities.rs
Normal file
24
gen/cloudsupport2_beta/src/api/utilities.rs
Normal file
@@ -0,0 +1,24 @@
|
||||
use super::*;
|
||||
/// Identifies the an OAuth2 authorization scope.
|
||||
/// A scope is needed when requesting an
|
||||
/// [authorization token](https://developers.google.com/youtube/v3/guides/authentication).
|
||||
#[derive(PartialEq, Eq, Hash, Debug, Clone)]
|
||||
pub enum Scope {
|
||||
/// See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.
|
||||
CloudPlatform,
|
||||
}
|
||||
|
||||
impl AsRef<str> for Scope {
|
||||
fn as_ref(&self) -> &str {
|
||||
match *self {
|
||||
Scope::CloudPlatform => "https://www.googleapis.com/auth/cloud-platform",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for Scope {
|
||||
fn default() -> Scope {
|
||||
Scope::CloudPlatform
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
// This file was generated automatically from 'src/generator/templates/api/lib.rs.mako'
|
||||
// DO NOT EDIT !
|
||||
|
||||
//! This documentation was generated from *Cloud Support* crate version *5.0.4+20240304*, where *20240304* is the exact revision of the *cloudsupport:v2beta* schema built by the [mako](http://www.makotemplates.org/) code generator *v5.0.4*.
|
||||
//! This documentation was generated from *Cloud Support* crate version *5.0.5+20240416*, where *20240416* is the exact revision of the *cloudsupport:v2beta* schema built by the [mako](http://www.makotemplates.org/) code generator *v5.0.5*.
|
||||
//!
|
||||
//! Everything else about the *Cloud Support* *v2_beta* API can be found at the
|
||||
//! [official documentation site](https://cloud.google.com/support/docs/apis).
|
||||
//! The original source code is [on github](https://github.com/Byron/google-apis-rs/tree/main/gen/cloudsupport2_beta).
|
||||
//! # Features
|
||||
//!
|
||||
//! Handle the following *Resources* with ease from the central [hub](CloudSupport) ...
|
||||
//! Handle the following *Resources* with ease from the central [hub](CloudSupport) ...
|
||||
//!
|
||||
//! * [case classifications](api::CaseClassification)
|
||||
//! * [*search*](api::CaseClassificationSearchCall)
|
||||
@@ -71,8 +71,8 @@
|
||||
//! let r = hub.cases().search(...).doit().await
|
||||
//! ```
|
||||
//!
|
||||
//! The `resource()` and `activity(...)` calls create [builders][builder-pattern]. The second one dealing with `Activities`
|
||||
//! supports various methods to configure the impending operation (not shown here). It is made such that all required arguments have to be
|
||||
//! The `resource()` and `activity(...)` calls create [builders][builder-pattern]. The second one dealing with `Activities`
|
||||
//! supports various methods to configure the impending operation (not shown here). It is made such that all required arguments have to be
|
||||
//! specified right away (i.e. `(...)`), whereas all optional ones can be [build up][builder-pattern] as desired.
|
||||
//! The `doit()` method performs the actual communication with the server and returns the respective result.
|
||||
//!
|
||||
@@ -96,31 +96,31 @@
|
||||
//! extern crate hyper_rustls;
|
||||
//! extern crate google_cloudsupport2_beta as cloudsupport2_beta;
|
||||
//! use cloudsupport2_beta::{Result, Error};
|
||||
//! use cloudsupport2_beta::api::enums::*;
|
||||
//! # async fn dox() {
|
||||
//! use std::default::Default;
|
||||
//! use cloudsupport2_beta::{CloudSupport, oauth2, hyper, hyper_rustls, chrono, FieldMask};
|
||||
//!
|
||||
//! // Get an ApplicationSecret instance by some means. It contains the `client_id` and
|
||||
//! // Get an ApplicationSecret instance by some means. It contains the `client_id` and
|
||||
//! // `client_secret`, among other things.
|
||||
//! let secret: oauth2::ApplicationSecret = Default::default();
|
||||
//! // Instantiate the authenticator. It will choose a suitable authentication flow for you,
|
||||
//! // Instantiate the authenticator. It will choose a suitable authentication flow for you,
|
||||
//! // unless you replace `None` with the desired Flow.
|
||||
//! // Provide your own `AuthenticatorDelegate` to adjust the way it operates and get feedback about
|
||||
//! // Provide your own `AuthenticatorDelegate` to adjust the way it operates and get feedback about
|
||||
//! // what's going on. You probably want to bring in your own `TokenStorage` to persist tokens and
|
||||
//! // retrieve them from storage.
|
||||
//! let auth = oauth2::InstalledFlowAuthenticator::builder(
|
||||
//! secret,
|
||||
//! oauth2::InstalledFlowReturnMethod::HTTPRedirect,
|
||||
//! ).build().await.unwrap();
|
||||
//! let mut hub = CloudSupport::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().https_or_http().enable_http1().build()), auth);
|
||||
//! let mut hub = CloudSupport::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().unwrap().https_or_http().enable_http1().build()), auth);
|
||||
//! // You can configure optional parameters by calling the respective setters at will, and
|
||||
//! // execute the final call using `doit()`.
|
||||
//! // Values shown here are possibly random and not representative !
|
||||
//! let result = hub.cases().list("parent")
|
||||
//! .product_line("sanctus")
|
||||
//! .page_token("sed")
|
||||
//! .page_size(-2)
|
||||
//! .filter("takimata")
|
||||
//! .page_token("At")
|
||||
//! .page_size(-8)
|
||||
//! .filter("sed")
|
||||
//! .doit().await;
|
||||
//!
|
||||
//! match result {
|
||||
@@ -145,10 +145,10 @@
|
||||
//! ## Handling Errors
|
||||
//!
|
||||
//! All errors produced by the system are provided either as [Result](client::Result) enumeration as return value of
|
||||
//! the doit() methods, or handed as possibly intermediate results to either the
|
||||
//! the doit() methods, or handed as possibly intermediate results to either the
|
||||
//! [Hub Delegate](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
|
||||
//! 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
|
||||
@@ -158,25 +158,25 @@
|
||||
//! 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")`.
|
||||
//!
|
||||
//! Methods supporting uploads can do so using up to 2 different protocols:
|
||||
//! *simple* and *resumable*. The distinctiveness of each is represented by customized
|
||||
//! Methods supporting uploads can do so using up to 2 different protocols:
|
||||
//! *simple* and *resumable*. The distinctiveness of each is represented by customized
|
||||
//! `doit(...)` methods, which are then named `upload(...)` and `upload_resumable(...)` respectively.
|
||||
//!
|
||||
//! ## Customization and Callbacks
|
||||
//!
|
||||
//! You may alter the way an `doit()` method is called by providing a [delegate](client::Delegate) to the
|
||||
//! [Method Builder](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
|
||||
//! You may alter the way an `doit()` method is called by providing a [delegate](client::Delegate) to the
|
||||
//! [Method Builder](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](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](client::RequestValue) and
|
||||
//! [decodable](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](client::RequestValue) and
|
||||
//! [decodable](client::ResponseResult) via *json*. Optionals are used to indicate that partial requests are responses
|
||||
//! are valid.
|
||||
//! Most optionals are are considered [Parts](client::Part) which are identifiable by name, which will be sent to
|
||||
//! Most optionals are are considered [Parts](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
|
||||
|
||||
Reference in New Issue
Block a user