mirror of
https://github.com/OMGeeky/google-apis-rs.git
synced 2026-02-23 15:49:49 +01:00
Rebuild everything, becuase it makes it easier to compare everything to my changes
This commit is contained in:
@@ -172,7 +172,7 @@
|
||||
//!
|
||||
//! ## Optional Parts in Server-Requests
|
||||
//!
|
||||
//! All structures provided by this library are made to be [enocodable](trait.RequestValue.html) and
|
||||
//! All structures provided by this library are made to be [encodable](trait.RequestValue.html) and
|
||||
//! [decodable](trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses
|
||||
//! are valid.
|
||||
//! Most optionals are are considered [Parts](trait.Part.html) which are identifiable by name, which will be sent to
|
||||
@@ -4258,9 +4258,15 @@ impl<'a, C, A> ProjectAgentSessionEntityTypeListCall<'a, C, A> where C: BorrowMu
|
||||
if !res.status.is_success() {
|
||||
let mut json_err = String::new();
|
||||
res.read_to_string(&mut json_err).unwrap();
|
||||
|
||||
let json_server_error = json::from_str::<JsonServerError>(&json_err).ok();
|
||||
let server_error = json::from_str::<ServerError>(&json_err)
|
||||
.or_else(|_| json::from_str::<ErrorResponse>(&json_err).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let oauth2::Retry::After(d) = dlg.http_failure(&res,
|
||||
json::from_str(&json_err).ok(),
|
||||
json::from_str(&json_err).ok()) {
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
continue;
|
||||
}
|
||||
@@ -4526,9 +4532,15 @@ impl<'a, C, A> ProjectAgentEnvironmentUserSessionContextDeleteCall<'a, C, A> whe
|
||||
if !res.status.is_success() {
|
||||
let mut json_err = String::new();
|
||||
res.read_to_string(&mut json_err).unwrap();
|
||||
|
||||
let json_server_error = json::from_str::<JsonServerError>(&json_err).ok();
|
||||
let server_error = json::from_str::<ServerError>(&json_err)
|
||||
.or_else(|_| json::from_str::<ErrorResponse>(&json_err).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let oauth2::Retry::After(d) = dlg.http_failure(&res,
|
||||
json::from_str(&json_err).ok(),
|
||||
json::from_str(&json_err).ok()) {
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
continue;
|
||||
}
|
||||
@@ -4810,9 +4822,15 @@ impl<'a, C, A> ProjectAgentSessionEntityTypePatchCall<'a, C, A> where C: BorrowM
|
||||
if !res.status.is_success() {
|
||||
let mut json_err = String::new();
|
||||
res.read_to_string(&mut json_err).unwrap();
|
||||
|
||||
let json_server_error = json::from_str::<JsonServerError>(&json_err).ok();
|
||||
let server_error = json::from_str::<ServerError>(&json_err)
|
||||
.or_else(|_| json::from_str::<ErrorResponse>(&json_err).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let oauth2::Retry::After(d) = dlg.http_failure(&res,
|
||||
json::from_str(&json_err).ok(),
|
||||
json::from_str(&json_err).ok()) {
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
continue;
|
||||
}
|
||||
@@ -5087,9 +5105,15 @@ impl<'a, C, A> ProjectAgentEnvironmentUserSessionEntityTypeDeleteCall<'a, C, A>
|
||||
if !res.status.is_success() {
|
||||
let mut json_err = String::new();
|
||||
res.read_to_string(&mut json_err).unwrap();
|
||||
|
||||
let json_server_error = json::from_str::<JsonServerError>(&json_err).ok();
|
||||
let server_error = json::from_str::<ServerError>(&json_err)
|
||||
.or_else(|_| json::from_str::<ErrorResponse>(&json_err).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let oauth2::Retry::After(d) = dlg.http_failure(&res,
|
||||
json::from_str(&json_err).ok(),
|
||||
json::from_str(&json_err).ok()) {
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
continue;
|
||||
}
|
||||
@@ -5341,9 +5365,15 @@ impl<'a, C, A> ProjectAgentEnvironmentUserSessionContextGetCall<'a, C, A> where
|
||||
if !res.status.is_success() {
|
||||
let mut json_err = String::new();
|
||||
res.read_to_string(&mut json_err).unwrap();
|
||||
|
||||
let json_server_error = json::from_str::<JsonServerError>(&json_err).ok();
|
||||
let server_error = json::from_str::<ServerError>(&json_err)
|
||||
.or_else(|_| json::from_str::<ErrorResponse>(&json_err).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let oauth2::Retry::After(d) = dlg.http_failure(&res,
|
||||
json::from_str(&json_err).ok(),
|
||||
json::from_str(&json_err).ok()) {
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
continue;
|
||||
}
|
||||
@@ -5596,9 +5626,15 @@ impl<'a, C, A> ProjectLocationOperationGetCall<'a, C, A> where C: BorrowMut<hype
|
||||
if !res.status.is_success() {
|
||||
let mut json_err = String::new();
|
||||
res.read_to_string(&mut json_err).unwrap();
|
||||
|
||||
let json_server_error = json::from_str::<JsonServerError>(&json_err).ok();
|
||||
let server_error = json::from_str::<ServerError>(&json_err)
|
||||
.or_else(|_| json::from_str::<ErrorResponse>(&json_err).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let oauth2::Retry::After(d) = dlg.http_failure(&res,
|
||||
json::from_str(&json_err).ok(),
|
||||
json::from_str(&json_err).ok()) {
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
continue;
|
||||
}
|
||||
@@ -5868,9 +5904,15 @@ impl<'a, C, A> ProjectAgentEntityTypeBatchUpdateCall<'a, C, A> where C: BorrowMu
|
||||
if !res.status.is_success() {
|
||||
let mut json_err = String::new();
|
||||
res.read_to_string(&mut json_err).unwrap();
|
||||
|
||||
let json_server_error = json::from_str::<JsonServerError>(&json_err).ok();
|
||||
let server_error = json::from_str::<ServerError>(&json_err)
|
||||
.or_else(|_| json::from_str::<ErrorResponse>(&json_err).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let oauth2::Retry::After(d) = dlg.http_failure(&res,
|
||||
json::from_str(&json_err).ok(),
|
||||
json::from_str(&json_err).ok()) {
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
continue;
|
||||
}
|
||||
@@ -6136,9 +6178,15 @@ impl<'a, C, A> ProjectAgentSessionContextListCall<'a, C, A> where C: BorrowMut<h
|
||||
if !res.status.is_success() {
|
||||
let mut json_err = String::new();
|
||||
res.read_to_string(&mut json_err).unwrap();
|
||||
|
||||
let json_server_error = json::from_str::<JsonServerError>(&json_err).ok();
|
||||
let server_error = json::from_str::<ServerError>(&json_err)
|
||||
.or_else(|_| json::from_str::<ErrorResponse>(&json_err).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let oauth2::Retry::After(d) = dlg.http_failure(&res,
|
||||
json::from_str(&json_err).ok(),
|
||||
json::from_str(&json_err).ok()) {
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
continue;
|
||||
}
|
||||
@@ -6428,9 +6476,15 @@ impl<'a, C, A> ProjectAgentTrainCall<'a, C, A> where C: BorrowMut<hyper::Client>
|
||||
if !res.status.is_success() {
|
||||
let mut json_err = String::new();
|
||||
res.read_to_string(&mut json_err).unwrap();
|
||||
|
||||
let json_server_error = json::from_str::<JsonServerError>(&json_err).ok();
|
||||
let server_error = json::from_str::<ServerError>(&json_err)
|
||||
.or_else(|_| json::from_str::<ErrorResponse>(&json_err).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let oauth2::Retry::After(d) = dlg.http_failure(&res,
|
||||
json::from_str(&json_err).ok(),
|
||||
json::from_str(&json_err).ok()) {
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
continue;
|
||||
}
|
||||
@@ -6710,9 +6764,15 @@ impl<'a, C, A> ProjectAgentIntentBatchUpdateCall<'a, C, A> where C: BorrowMut<hy
|
||||
if !res.status.is_success() {
|
||||
let mut json_err = String::new();
|
||||
res.read_to_string(&mut json_err).unwrap();
|
||||
|
||||
let json_server_error = json::from_str::<JsonServerError>(&json_err).ok();
|
||||
let server_error = json::from_str::<ServerError>(&json_err)
|
||||
.or_else(|_| json::from_str::<ErrorResponse>(&json_err).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let oauth2::Retry::After(d) = dlg.http_failure(&res,
|
||||
json::from_str(&json_err).ok(),
|
||||
json::from_str(&json_err).ok()) {
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
continue;
|
||||
}
|
||||
@@ -6995,9 +7055,15 @@ impl<'a, C, A> ProjectSetAgentCall<'a, C, A> where C: BorrowMut<hyper::Client>,
|
||||
if !res.status.is_success() {
|
||||
let mut json_err = String::new();
|
||||
res.read_to_string(&mut json_err).unwrap();
|
||||
|
||||
let json_server_error = json::from_str::<JsonServerError>(&json_err).ok();
|
||||
let server_error = json::from_str::<ServerError>(&json_err)
|
||||
.or_else(|_| json::from_str::<ErrorResponse>(&json_err).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let oauth2::Retry::After(d) = dlg.http_failure(&res,
|
||||
json::from_str(&json_err).ok(),
|
||||
json::from_str(&json_err).ok()) {
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
continue;
|
||||
}
|
||||
@@ -7266,9 +7332,15 @@ impl<'a, C, A> ProjectAgentGetValidationResultCall<'a, C, A> where C: BorrowMut<
|
||||
if !res.status.is_success() {
|
||||
let mut json_err = String::new();
|
||||
res.read_to_string(&mut json_err).unwrap();
|
||||
|
||||
let json_server_error = json::from_str::<JsonServerError>(&json_err).ok();
|
||||
let server_error = json::from_str::<ServerError>(&json_err)
|
||||
.or_else(|_| json::from_str::<ErrorResponse>(&json_err).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let oauth2::Retry::After(d) = dlg.http_failure(&res,
|
||||
json::from_str(&json_err).ok(),
|
||||
json::from_str(&json_err).ok()) {
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
continue;
|
||||
}
|
||||
@@ -7553,9 +7625,15 @@ impl<'a, C, A> ProjectAgentRestoreCall<'a, C, A> where C: BorrowMut<hyper::Clien
|
||||
if !res.status.is_success() {
|
||||
let mut json_err = String::new();
|
||||
res.read_to_string(&mut json_err).unwrap();
|
||||
|
||||
let json_server_error = json::from_str::<JsonServerError>(&json_err).ok();
|
||||
let server_error = json::from_str::<ServerError>(&json_err)
|
||||
.or_else(|_| json::from_str::<ErrorResponse>(&json_err).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let oauth2::Retry::After(d) = dlg.http_failure(&res,
|
||||
json::from_str(&json_err).ok(),
|
||||
json::from_str(&json_err).ok()) {
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
continue;
|
||||
}
|
||||
@@ -7836,9 +7914,15 @@ impl<'a, C, A> ProjectAgentSessionDetectIntentCall<'a, C, A> where C: BorrowMut<
|
||||
if !res.status.is_success() {
|
||||
let mut json_err = String::new();
|
||||
res.read_to_string(&mut json_err).unwrap();
|
||||
|
||||
let json_server_error = json::from_str::<JsonServerError>(&json_err).ok();
|
||||
let server_error = json::from_str::<ServerError>(&json_err)
|
||||
.or_else(|_| json::from_str::<ErrorResponse>(&json_err).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let oauth2::Retry::After(d) = dlg.http_failure(&res,
|
||||
json::from_str(&json_err).ok(),
|
||||
json::from_str(&json_err).ok()) {
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
continue;
|
||||
}
|
||||
@@ -8128,9 +8212,15 @@ impl<'a, C, A> ProjectAgentEnvironmentUserSessionContextPatchCall<'a, C, A> wher
|
||||
if !res.status.is_success() {
|
||||
let mut json_err = String::new();
|
||||
res.read_to_string(&mut json_err).unwrap();
|
||||
|
||||
let json_server_error = json::from_str::<JsonServerError>(&json_err).ok();
|
||||
let server_error = json::from_str::<ServerError>(&json_err)
|
||||
.or_else(|_| json::from_str::<ErrorResponse>(&json_err).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let oauth2::Retry::After(d) = dlg.http_failure(&res,
|
||||
json::from_str(&json_err).ok(),
|
||||
json::from_str(&json_err).ok()) {
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
continue;
|
||||
}
|
||||
@@ -8408,9 +8498,15 @@ impl<'a, C, A> ProjectGetAgentCall<'a, C, A> where C: BorrowMut<hyper::Client>,
|
||||
if !res.status.is_success() {
|
||||
let mut json_err = String::new();
|
||||
res.read_to_string(&mut json_err).unwrap();
|
||||
|
||||
let json_server_error = json::from_str::<JsonServerError>(&json_err).ok();
|
||||
let server_error = json::from_str::<ServerError>(&json_err)
|
||||
.or_else(|_| json::from_str::<ErrorResponse>(&json_err).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let oauth2::Retry::After(d) = dlg.http_failure(&res,
|
||||
json::from_str(&json_err).ok(),
|
||||
json::from_str(&json_err).ok()) {
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
continue;
|
||||
}
|
||||
@@ -8688,9 +8784,15 @@ impl<'a, C, A> ProjectAgentEnvironmentUserSessionEntityTypePatchCall<'a, C, A> w
|
||||
if !res.status.is_success() {
|
||||
let mut json_err = String::new();
|
||||
res.read_to_string(&mut json_err).unwrap();
|
||||
|
||||
let json_server_error = json::from_str::<JsonServerError>(&json_err).ok();
|
||||
let server_error = json::from_str::<ServerError>(&json_err)
|
||||
.or_else(|_| json::from_str::<ErrorResponse>(&json_err).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let oauth2::Retry::After(d) = dlg.http_failure(&res,
|
||||
json::from_str(&json_err).ok(),
|
||||
json::from_str(&json_err).ok()) {
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
continue;
|
||||
}
|
||||
@@ -8985,9 +9087,15 @@ impl<'a, C, A> ProjectAgentEntityTypeBatchDeleteCall<'a, C, A> where C: BorrowMu
|
||||
if !res.status.is_success() {
|
||||
let mut json_err = String::new();
|
||||
res.read_to_string(&mut json_err).unwrap();
|
||||
|
||||
let json_server_error = json::from_str::<JsonServerError>(&json_err).ok();
|
||||
let server_error = json::from_str::<ServerError>(&json_err)
|
||||
.or_else(|_| json::from_str::<ErrorResponse>(&json_err).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let oauth2::Retry::After(d) = dlg.http_failure(&res,
|
||||
json::from_str(&json_err).ok(),
|
||||
json::from_str(&json_err).ok()) {
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
continue;
|
||||
}
|
||||
@@ -9243,9 +9351,15 @@ impl<'a, C, A> ProjectAgentGetFulfillmentCall<'a, C, A> where C: BorrowMut<hyper
|
||||
if !res.status.is_success() {
|
||||
let mut json_err = String::new();
|
||||
res.read_to_string(&mut json_err).unwrap();
|
||||
|
||||
let json_server_error = json::from_str::<JsonServerError>(&json_err).ok();
|
||||
let server_error = json::from_str::<ServerError>(&json_err)
|
||||
.or_else(|_| json::from_str::<ErrorResponse>(&json_err).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let oauth2::Retry::After(d) = dlg.http_failure(&res,
|
||||
json::from_str(&json_err).ok(),
|
||||
json::from_str(&json_err).ok()) {
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
continue;
|
||||
}
|
||||
@@ -9516,9 +9630,15 @@ impl<'a, C, A> ProjectLocationOperationListCall<'a, C, A> where C: BorrowMut<hyp
|
||||
if !res.status.is_success() {
|
||||
let mut json_err = String::new();
|
||||
res.read_to_string(&mut json_err).unwrap();
|
||||
|
||||
let json_server_error = json::from_str::<JsonServerError>(&json_err).ok();
|
||||
let server_error = json::from_str::<ServerError>(&json_err)
|
||||
.or_else(|_| json::from_str::<ErrorResponse>(&json_err).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let oauth2::Retry::After(d) = dlg.http_failure(&res,
|
||||
json::from_str(&json_err).ok(),
|
||||
json::from_str(&json_err).ok()) {
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
continue;
|
||||
}
|
||||
@@ -9805,9 +9925,15 @@ impl<'a, C, A> ProjectAgentIntentListCall<'a, C, A> where C: BorrowMut<hyper::Cl
|
||||
if !res.status.is_success() {
|
||||
let mut json_err = String::new();
|
||||
res.read_to_string(&mut json_err).unwrap();
|
||||
|
||||
let json_server_error = json::from_str::<JsonServerError>(&json_err).ok();
|
||||
let server_error = json::from_str::<ServerError>(&json_err)
|
||||
.or_else(|_| json::from_str::<ErrorResponse>(&json_err).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let oauth2::Retry::After(d) = dlg.http_failure(&res,
|
||||
json::from_str(&json_err).ok(),
|
||||
json::from_str(&json_err).ok()) {
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
continue;
|
||||
}
|
||||
@@ -10114,9 +10240,15 @@ impl<'a, C, A> ProjectAgentEntityTypeEntityBatchUpdateCall<'a, C, A> where C: Bo
|
||||
if !res.status.is_success() {
|
||||
let mut json_err = String::new();
|
||||
res.read_to_string(&mut json_err).unwrap();
|
||||
|
||||
let json_server_error = json::from_str::<JsonServerError>(&json_err).ok();
|
||||
let server_error = json::from_str::<ServerError>(&json_err)
|
||||
.or_else(|_| json::from_str::<ErrorResponse>(&json_err).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let oauth2::Retry::After(d) = dlg.http_failure(&res,
|
||||
json::from_str(&json_err).ok(),
|
||||
json::from_str(&json_err).ok()) {
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
continue;
|
||||
}
|
||||
@@ -10401,9 +10533,15 @@ impl<'a, C, A> ProjectAgentSessionEntityTypeCreateCall<'a, C, A> where C: Borrow
|
||||
if !res.status.is_success() {
|
||||
let mut json_err = String::new();
|
||||
res.read_to_string(&mut json_err).unwrap();
|
||||
|
||||
let json_server_error = json::from_str::<JsonServerError>(&json_err).ok();
|
||||
let server_error = json::from_str::<ServerError>(&json_err)
|
||||
.or_else(|_| json::from_str::<ErrorResponse>(&json_err).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let oauth2::Retry::After(d) = dlg.http_failure(&res,
|
||||
json::from_str(&json_err).ok(),
|
||||
json::from_str(&json_err).ok()) {
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
continue;
|
||||
}
|
||||
@@ -10672,9 +10810,15 @@ impl<'a, C, A> ProjectOperationCancelCall<'a, C, A> where C: BorrowMut<hyper::Cl
|
||||
if !res.status.is_success() {
|
||||
let mut json_err = String::new();
|
||||
res.read_to_string(&mut json_err).unwrap();
|
||||
|
||||
let json_server_error = json::from_str::<JsonServerError>(&json_err).ok();
|
||||
let server_error = json::from_str::<ServerError>(&json_err)
|
||||
.or_else(|_| json::from_str::<ErrorResponse>(&json_err).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let oauth2::Retry::After(d) = dlg.http_failure(&res,
|
||||
json::from_str(&json_err).ok(),
|
||||
json::from_str(&json_err).ok()) {
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
continue;
|
||||
}
|
||||
@@ -10920,9 +11064,15 @@ impl<'a, C, A> ProjectAgentEnvironmentUserSessionDeleteContextCall<'a, C, A> whe
|
||||
if !res.status.is_success() {
|
||||
let mut json_err = String::new();
|
||||
res.read_to_string(&mut json_err).unwrap();
|
||||
|
||||
let json_server_error = json::from_str::<JsonServerError>(&json_err).ok();
|
||||
let server_error = json::from_str::<ServerError>(&json_err)
|
||||
.or_else(|_| json::from_str::<ErrorResponse>(&json_err).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let oauth2::Retry::After(d) = dlg.http_failure(&res,
|
||||
json::from_str(&json_err).ok(),
|
||||
json::from_str(&json_err).ok()) {
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
continue;
|
||||
}
|
||||
@@ -11197,9 +11347,15 @@ impl<'a, C, A> ProjectAgentEntityTypeEntityBatchCreateCall<'a, C, A> where C: Bo
|
||||
if !res.status.is_success() {
|
||||
let mut json_err = String::new();
|
||||
res.read_to_string(&mut json_err).unwrap();
|
||||
|
||||
let json_server_error = json::from_str::<JsonServerError>(&json_err).ok();
|
||||
let server_error = json::from_str::<ServerError>(&json_err)
|
||||
.or_else(|_| json::from_str::<ErrorResponse>(&json_err).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let oauth2::Retry::After(d) = dlg.http_failure(&res,
|
||||
json::from_str(&json_err).ok(),
|
||||
json::from_str(&json_err).ok()) {
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
continue;
|
||||
}
|
||||
@@ -11492,9 +11648,15 @@ impl<'a, C, A> ProjectAgentIntentPatchCall<'a, C, A> where C: BorrowMut<hyper::C
|
||||
if !res.status.is_success() {
|
||||
let mut json_err = String::new();
|
||||
res.read_to_string(&mut json_err).unwrap();
|
||||
|
||||
let json_server_error = json::from_str::<JsonServerError>(&json_err).ok();
|
||||
let server_error = json::from_str::<ServerError>(&json_err)
|
||||
.or_else(|_| json::from_str::<ErrorResponse>(&json_err).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let oauth2::Retry::After(d) = dlg.http_failure(&res,
|
||||
json::from_str(&json_err).ok(),
|
||||
json::from_str(&json_err).ok()) {
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
continue;
|
||||
}
|
||||
@@ -11781,9 +11943,15 @@ impl<'a, C, A> ProjectAgentEnvironmentUserSessionEntityTypeGetCall<'a, C, A> whe
|
||||
if !res.status.is_success() {
|
||||
let mut json_err = String::new();
|
||||
res.read_to_string(&mut json_err).unwrap();
|
||||
|
||||
let json_server_error = json::from_str::<JsonServerError>(&json_err).ok();
|
||||
let server_error = json::from_str::<ServerError>(&json_err)
|
||||
.or_else(|_| json::from_str::<ErrorResponse>(&json_err).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let oauth2::Retry::After(d) = dlg.http_failure(&res,
|
||||
json::from_str(&json_err).ok(),
|
||||
json::from_str(&json_err).ok()) {
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
continue;
|
||||
}
|
||||
@@ -12059,9 +12227,15 @@ impl<'a, C, A> ProjectAgentIntentBatchDeleteCall<'a, C, A> where C: BorrowMut<hy
|
||||
if !res.status.is_success() {
|
||||
let mut json_err = String::new();
|
||||
res.read_to_string(&mut json_err).unwrap();
|
||||
|
||||
let json_server_error = json::from_str::<JsonServerError>(&json_err).ok();
|
||||
let server_error = json::from_str::<ServerError>(&json_err)
|
||||
.or_else(|_| json::from_str::<ErrorResponse>(&json_err).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let oauth2::Retry::After(d) = dlg.http_failure(&res,
|
||||
json::from_str(&json_err).ok(),
|
||||
json::from_str(&json_err).ok()) {
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
continue;
|
||||
}
|
||||
@@ -12346,9 +12520,15 @@ impl<'a, C, A> ProjectAgentEnvironmentUserSessionEntityTypeCreateCall<'a, C, A>
|
||||
if !res.status.is_success() {
|
||||
let mut json_err = String::new();
|
||||
res.read_to_string(&mut json_err).unwrap();
|
||||
|
||||
let json_server_error = json::from_str::<JsonServerError>(&json_err).ok();
|
||||
let server_error = json::from_str::<ServerError>(&json_err)
|
||||
.or_else(|_| json::from_str::<ErrorResponse>(&json_err).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let oauth2::Retry::After(d) = dlg.http_failure(&res,
|
||||
json::from_str(&json_err).ok(),
|
||||
json::from_str(&json_err).ok()) {
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
continue;
|
||||
}
|
||||
@@ -12608,9 +12788,15 @@ impl<'a, C, A> ProjectAgentSessionContextGetCall<'a, C, A> where C: BorrowMut<hy
|
||||
if !res.status.is_success() {
|
||||
let mut json_err = String::new();
|
||||
res.read_to_string(&mut json_err).unwrap();
|
||||
|
||||
let json_server_error = json::from_str::<JsonServerError>(&json_err).ok();
|
||||
let server_error = json::from_str::<ServerError>(&json_err)
|
||||
.or_else(|_| json::from_str::<ErrorResponse>(&json_err).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let oauth2::Retry::After(d) = dlg.http_failure(&res,
|
||||
json::from_str(&json_err).ok(),
|
||||
json::from_str(&json_err).ok()) {
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
continue;
|
||||
}
|
||||
@@ -12875,9 +13061,15 @@ impl<'a, C, A> ProjectAgentEnvironmentUserSessionEntityTypeListCall<'a, C, A> wh
|
||||
if !res.status.is_success() {
|
||||
let mut json_err = String::new();
|
||||
res.read_to_string(&mut json_err).unwrap();
|
||||
|
||||
let json_server_error = json::from_str::<JsonServerError>(&json_err).ok();
|
||||
let server_error = json::from_str::<ServerError>(&json_err)
|
||||
.or_else(|_| json::from_str::<ErrorResponse>(&json_err).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let oauth2::Retry::After(d) = dlg.http_failure(&res,
|
||||
json::from_str(&json_err).ok(),
|
||||
json::from_str(&json_err).ok()) {
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
continue;
|
||||
}
|
||||
@@ -13168,9 +13360,15 @@ impl<'a, C, A> ProjectAgentEnvironmentUserSessionDetectIntentCall<'a, C, A> wher
|
||||
if !res.status.is_success() {
|
||||
let mut json_err = String::new();
|
||||
res.read_to_string(&mut json_err).unwrap();
|
||||
|
||||
let json_server_error = json::from_str::<JsonServerError>(&json_err).ok();
|
||||
let server_error = json::from_str::<ServerError>(&json_err)
|
||||
.or_else(|_| json::from_str::<ErrorResponse>(&json_err).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let oauth2::Retry::After(d) = dlg.http_failure(&res,
|
||||
json::from_str(&json_err).ok(),
|
||||
json::from_str(&json_err).ok()) {
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
continue;
|
||||
}
|
||||
@@ -13457,9 +13655,15 @@ impl<'a, C, A> ProjectAgentEnvironmentUserSessionContextCreateCall<'a, C, A> whe
|
||||
if !res.status.is_success() {
|
||||
let mut json_err = String::new();
|
||||
res.read_to_string(&mut json_err).unwrap();
|
||||
|
||||
let json_server_error = json::from_str::<JsonServerError>(&json_err).ok();
|
||||
let server_error = json::from_str::<ServerError>(&json_err)
|
||||
.or_else(|_| json::from_str::<ErrorResponse>(&json_err).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let oauth2::Retry::After(d) = dlg.http_failure(&res,
|
||||
json::from_str(&json_err).ok(),
|
||||
json::from_str(&json_err).ok()) {
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
continue;
|
||||
}
|
||||
@@ -13751,9 +13955,15 @@ impl<'a, C, A> ProjectAgentEntityTypePatchCall<'a, C, A> where C: BorrowMut<hype
|
||||
if !res.status.is_success() {
|
||||
let mut json_err = String::new();
|
||||
res.read_to_string(&mut json_err).unwrap();
|
||||
|
||||
let json_server_error = json::from_str::<JsonServerError>(&json_err).ok();
|
||||
let server_error = json::from_str::<ServerError>(&json_err)
|
||||
.or_else(|_| json::from_str::<ErrorResponse>(&json_err).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let oauth2::Retry::After(d) = dlg.http_failure(&res,
|
||||
json::from_str(&json_err).ok(),
|
||||
json::from_str(&json_err).ok()) {
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
continue;
|
||||
}
|
||||
@@ -14039,9 +14249,15 @@ impl<'a, C, A> ProjectAgentEnvironmentUserSessionContextListCall<'a, C, A> where
|
||||
if !res.status.is_success() {
|
||||
let mut json_err = String::new();
|
||||
res.read_to_string(&mut json_err).unwrap();
|
||||
|
||||
let json_server_error = json::from_str::<JsonServerError>(&json_err).ok();
|
||||
let server_error = json::from_str::<ServerError>(&json_err)
|
||||
.or_else(|_| json::from_str::<ErrorResponse>(&json_err).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let oauth2::Retry::After(d) = dlg.http_failure(&res,
|
||||
json::from_str(&json_err).ok(),
|
||||
json::from_str(&json_err).ok()) {
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
continue;
|
||||
}
|
||||
@@ -14307,9 +14523,15 @@ impl<'a, C, A> ProjectAgentEntityTypeDeleteCall<'a, C, A> where C: BorrowMut<hyp
|
||||
if !res.status.is_success() {
|
||||
let mut json_err = String::new();
|
||||
res.read_to_string(&mut json_err).unwrap();
|
||||
|
||||
let json_server_error = json::from_str::<JsonServerError>(&json_err).ok();
|
||||
let server_error = json::from_str::<ServerError>(&json_err)
|
||||
.or_else(|_| json::from_str::<ErrorResponse>(&json_err).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let oauth2::Retry::After(d) = dlg.http_failure(&res,
|
||||
json::from_str(&json_err).ok(),
|
||||
json::from_str(&json_err).ok()) {
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
continue;
|
||||
}
|
||||
@@ -14560,9 +14782,15 @@ impl<'a, C, A> ProjectAgentSessionEntityTypeGetCall<'a, C, A> where C: BorrowMut
|
||||
if !res.status.is_success() {
|
||||
let mut json_err = String::new();
|
||||
res.read_to_string(&mut json_err).unwrap();
|
||||
|
||||
let json_server_error = json::from_str::<JsonServerError>(&json_err).ok();
|
||||
let server_error = json::from_str::<ServerError>(&json_err)
|
||||
.or_else(|_| json::from_str::<ErrorResponse>(&json_err).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let oauth2::Retry::After(d) = dlg.http_failure(&res,
|
||||
json::from_str(&json_err).ok(),
|
||||
json::from_str(&json_err).ok()) {
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
continue;
|
||||
}
|
||||
@@ -14841,9 +15069,15 @@ impl<'a, C, A> ProjectAgentEntityTypeCreateCall<'a, C, A> where C: BorrowMut<hyp
|
||||
if !res.status.is_success() {
|
||||
let mut json_err = String::new();
|
||||
res.read_to_string(&mut json_err).unwrap();
|
||||
|
||||
let json_server_error = json::from_str::<JsonServerError>(&json_err).ok();
|
||||
let server_error = json::from_str::<ServerError>(&json_err)
|
||||
.or_else(|_| json::from_str::<ErrorResponse>(&json_err).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let oauth2::Retry::After(d) = dlg.http_failure(&res,
|
||||
json::from_str(&json_err).ok(),
|
||||
json::from_str(&json_err).ok()) {
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
continue;
|
||||
}
|
||||
@@ -15115,9 +15349,15 @@ impl<'a, C, A> ProjectAgentEntityTypeGetCall<'a, C, A> where C: BorrowMut<hyper:
|
||||
if !res.status.is_success() {
|
||||
let mut json_err = String::new();
|
||||
res.read_to_string(&mut json_err).unwrap();
|
||||
|
||||
let json_server_error = json::from_str::<JsonServerError>(&json_err).ok();
|
||||
let server_error = json::from_str::<ServerError>(&json_err)
|
||||
.or_else(|_| json::from_str::<ErrorResponse>(&json_err).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let oauth2::Retry::After(d) = dlg.http_failure(&res,
|
||||
json::from_str(&json_err).ok(),
|
||||
json::from_str(&json_err).ok()) {
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
continue;
|
||||
}
|
||||
@@ -15400,9 +15640,15 @@ impl<'a, C, A> ProjectAgentEntityTypeEntityBatchDeleteCall<'a, C, A> where C: Bo
|
||||
if !res.status.is_success() {
|
||||
let mut json_err = String::new();
|
||||
res.read_to_string(&mut json_err).unwrap();
|
||||
|
||||
let json_server_error = json::from_str::<JsonServerError>(&json_err).ok();
|
||||
let server_error = json::from_str::<ServerError>(&json_err)
|
||||
.or_else(|_| json::from_str::<ErrorResponse>(&json_err).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let oauth2::Retry::After(d) = dlg.http_failure(&res,
|
||||
json::from_str(&json_err).ok(),
|
||||
json::from_str(&json_err).ok()) {
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
continue;
|
||||
}
|
||||
@@ -15685,9 +15931,15 @@ impl<'a, C, A> ProjectAgentSessionContextPatchCall<'a, C, A> where C: BorrowMut<
|
||||
if !res.status.is_success() {
|
||||
let mut json_err = String::new();
|
||||
res.read_to_string(&mut json_err).unwrap();
|
||||
|
||||
let json_server_error = json::from_str::<JsonServerError>(&json_err).ok();
|
||||
let server_error = json::from_str::<ServerError>(&json_err)
|
||||
.or_else(|_| json::from_str::<ErrorResponse>(&json_err).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let oauth2::Retry::After(d) = dlg.http_failure(&res,
|
||||
json::from_str(&json_err).ok(),
|
||||
json::from_str(&json_err).ok()) {
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
continue;
|
||||
}
|
||||
@@ -15992,9 +16244,15 @@ impl<'a, C, A> ProjectAgentUpdateFulfillmentCall<'a, C, A> where C: BorrowMut<hy
|
||||
if !res.status.is_success() {
|
||||
let mut json_err = String::new();
|
||||
res.read_to_string(&mut json_err).unwrap();
|
||||
|
||||
let json_server_error = json::from_str::<JsonServerError>(&json_err).ok();
|
||||
let server_error = json::from_str::<ServerError>(&json_err)
|
||||
.or_else(|_| json::from_str::<ErrorResponse>(&json_err).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let oauth2::Retry::After(d) = dlg.http_failure(&res,
|
||||
json::from_str(&json_err).ok(),
|
||||
json::from_str(&json_err).ok()) {
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
continue;
|
||||
}
|
||||
@@ -16267,9 +16525,15 @@ impl<'a, C, A> ProjectLocationOperationCancelCall<'a, C, A> where C: BorrowMut<h
|
||||
if !res.status.is_success() {
|
||||
let mut json_err = String::new();
|
||||
res.read_to_string(&mut json_err).unwrap();
|
||||
|
||||
let json_server_error = json::from_str::<JsonServerError>(&json_err).ok();
|
||||
let server_error = json::from_str::<ServerError>(&json_err)
|
||||
.or_else(|_| json::from_str::<ErrorResponse>(&json_err).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let oauth2::Retry::After(d) = dlg.http_failure(&res,
|
||||
json::from_str(&json_err).ok(),
|
||||
json::from_str(&json_err).ok()) {
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
continue;
|
||||
}
|
||||
@@ -16515,9 +16779,15 @@ impl<'a, C, A> ProjectAgentSessionDeleteContextCall<'a, C, A> where C: BorrowMut
|
||||
if !res.status.is_success() {
|
||||
let mut json_err = String::new();
|
||||
res.read_to_string(&mut json_err).unwrap();
|
||||
|
||||
let json_server_error = json::from_str::<JsonServerError>(&json_err).ok();
|
||||
let server_error = json::from_str::<ServerError>(&json_err)
|
||||
.or_else(|_| json::from_str::<ErrorResponse>(&json_err).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let oauth2::Retry::After(d) = dlg.http_failure(&res,
|
||||
json::from_str(&json_err).ok(),
|
||||
json::from_str(&json_err).ok()) {
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
continue;
|
||||
}
|
||||
@@ -16796,9 +17066,15 @@ impl<'a, C, A> ProjectAgentImportCall<'a, C, A> where C: BorrowMut<hyper::Client
|
||||
if !res.status.is_success() {
|
||||
let mut json_err = String::new();
|
||||
res.read_to_string(&mut json_err).unwrap();
|
||||
|
||||
let json_server_error = json::from_str::<JsonServerError>(&json_err).ok();
|
||||
let server_error = json::from_str::<ServerError>(&json_err)
|
||||
.or_else(|_| json::from_str::<ErrorResponse>(&json_err).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let oauth2::Retry::After(d) = dlg.http_failure(&res,
|
||||
json::from_str(&json_err).ok(),
|
||||
json::from_str(&json_err).ok()) {
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
continue;
|
||||
}
|
||||
@@ -17056,9 +17332,15 @@ impl<'a, C, A> ProjectOperationGetCall<'a, C, A> where C: BorrowMut<hyper::Clien
|
||||
if !res.status.is_success() {
|
||||
let mut json_err = String::new();
|
||||
res.read_to_string(&mut json_err).unwrap();
|
||||
|
||||
let json_server_error = json::from_str::<JsonServerError>(&json_err).ok();
|
||||
let server_error = json::from_str::<ServerError>(&json_err)
|
||||
.or_else(|_| json::from_str::<ErrorResponse>(&json_err).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let oauth2::Retry::After(d) = dlg.http_failure(&res,
|
||||
json::from_str(&json_err).ok(),
|
||||
json::from_str(&json_err).ok()) {
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
continue;
|
||||
}
|
||||
@@ -17304,9 +17586,15 @@ impl<'a, C, A> ProjectDeleteAgentCall<'a, C, A> where C: BorrowMut<hyper::Client
|
||||
if !res.status.is_success() {
|
||||
let mut json_err = String::new();
|
||||
res.read_to_string(&mut json_err).unwrap();
|
||||
|
||||
let json_server_error = json::from_str::<JsonServerError>(&json_err).ok();
|
||||
let server_error = json::from_str::<ServerError>(&json_err)
|
||||
.or_else(|_| json::from_str::<ErrorResponse>(&json_err).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let oauth2::Retry::After(d) = dlg.http_failure(&res,
|
||||
json::from_str(&json_err).ok(),
|
||||
json::from_str(&json_err).ok()) {
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
continue;
|
||||
}
|
||||
@@ -17563,9 +17851,15 @@ impl<'a, C, A> ProjectAgentIntentGetCall<'a, C, A> where C: BorrowMut<hyper::Cli
|
||||
if !res.status.is_success() {
|
||||
let mut json_err = String::new();
|
||||
res.read_to_string(&mut json_err).unwrap();
|
||||
|
||||
let json_server_error = json::from_str::<JsonServerError>(&json_err).ok();
|
||||
let server_error = json::from_str::<ServerError>(&json_err)
|
||||
.or_else(|_| json::from_str::<ErrorResponse>(&json_err).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let oauth2::Retry::After(d) = dlg.http_failure(&res,
|
||||
json::from_str(&json_err).ok(),
|
||||
json::from_str(&json_err).ok()) {
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
continue;
|
||||
}
|
||||
@@ -17854,9 +18148,15 @@ impl<'a, C, A> ProjectAgentSessionContextCreateCall<'a, C, A> where C: BorrowMut
|
||||
if !res.status.is_success() {
|
||||
let mut json_err = String::new();
|
||||
res.read_to_string(&mut json_err).unwrap();
|
||||
|
||||
let json_server_error = json::from_str::<JsonServerError>(&json_err).ok();
|
||||
let server_error = json::from_str::<ServerError>(&json_err)
|
||||
.or_else(|_| json::from_str::<ErrorResponse>(&json_err).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let oauth2::Retry::After(d) = dlg.http_failure(&res,
|
||||
json::from_str(&json_err).ok(),
|
||||
json::from_str(&json_err).ok()) {
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
continue;
|
||||
}
|
||||
@@ -18116,9 +18416,15 @@ impl<'a, C, A> ProjectAgentSessionContextDeleteCall<'a, C, A> where C: BorrowMut
|
||||
if !res.status.is_success() {
|
||||
let mut json_err = String::new();
|
||||
res.read_to_string(&mut json_err).unwrap();
|
||||
|
||||
let json_server_error = json::from_str::<JsonServerError>(&json_err).ok();
|
||||
let server_error = json::from_str::<ServerError>(&json_err)
|
||||
.or_else(|_| json::from_str::<ErrorResponse>(&json_err).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let oauth2::Retry::After(d) = dlg.http_failure(&res,
|
||||
json::from_str(&json_err).ok(),
|
||||
json::from_str(&json_err).ok()) {
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
continue;
|
||||
}
|
||||
@@ -18393,9 +18699,15 @@ impl<'a, C, A> ProjectAgentExportCall<'a, C, A> where C: BorrowMut<hyper::Client
|
||||
if !res.status.is_success() {
|
||||
let mut json_err = String::new();
|
||||
res.read_to_string(&mut json_err).unwrap();
|
||||
|
||||
let json_server_error = json::from_str::<JsonServerError>(&json_err).ok();
|
||||
let server_error = json::from_str::<ServerError>(&json_err)
|
||||
.or_else(|_| json::from_str::<ErrorResponse>(&json_err).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let oauth2::Retry::After(d) = dlg.http_failure(&res,
|
||||
json::from_str(&json_err).ok(),
|
||||
json::from_str(&json_err).ok()) {
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
continue;
|
||||
}
|
||||
@@ -18666,9 +18978,15 @@ impl<'a, C, A> ProjectAgentEntityTypeListCall<'a, C, A> where C: BorrowMut<hyper
|
||||
if !res.status.is_success() {
|
||||
let mut json_err = String::new();
|
||||
res.read_to_string(&mut json_err).unwrap();
|
||||
|
||||
let json_server_error = json::from_str::<JsonServerError>(&json_err).ok();
|
||||
let server_error = json::from_str::<ServerError>(&json_err)
|
||||
.or_else(|_| json::from_str::<ErrorResponse>(&json_err).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let oauth2::Retry::After(d) = dlg.http_failure(&res,
|
||||
json::from_str(&json_err).ok(),
|
||||
json::from_str(&json_err).ok()) {
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
continue;
|
||||
}
|
||||
@@ -18945,9 +19263,15 @@ impl<'a, C, A> ProjectAgentSessionEntityTypeDeleteCall<'a, C, A> where C: Borrow
|
||||
if !res.status.is_success() {
|
||||
let mut json_err = String::new();
|
||||
res.read_to_string(&mut json_err).unwrap();
|
||||
|
||||
let json_server_error = json::from_str::<JsonServerError>(&json_err).ok();
|
||||
let server_error = json::from_str::<ServerError>(&json_err)
|
||||
.or_else(|_| json::from_str::<ErrorResponse>(&json_err).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let oauth2::Retry::After(d) = dlg.http_failure(&res,
|
||||
json::from_str(&json_err).ok(),
|
||||
json::from_str(&json_err).ok()) {
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
continue;
|
||||
}
|
||||
@@ -19215,9 +19539,15 @@ impl<'a, C, A> ProjectAgentSearchCall<'a, C, A> where C: BorrowMut<hyper::Client
|
||||
if !res.status.is_success() {
|
||||
let mut json_err = String::new();
|
||||
res.read_to_string(&mut json_err).unwrap();
|
||||
|
||||
let json_server_error = json::from_str::<JsonServerError>(&json_err).ok();
|
||||
let server_error = json::from_str::<ServerError>(&json_err)
|
||||
.or_else(|_| json::from_str::<ErrorResponse>(&json_err).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let oauth2::Retry::After(d) = dlg.http_failure(&res,
|
||||
json::from_str(&json_err).ok(),
|
||||
json::from_str(&json_err).ok()) {
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
continue;
|
||||
}
|
||||
@@ -19479,9 +19809,15 @@ impl<'a, C, A> ProjectAgentIntentDeleteCall<'a, C, A> where C: BorrowMut<hyper::
|
||||
if !res.status.is_success() {
|
||||
let mut json_err = String::new();
|
||||
res.read_to_string(&mut json_err).unwrap();
|
||||
|
||||
let json_server_error = json::from_str::<JsonServerError>(&json_err).ok();
|
||||
let server_error = json::from_str::<ServerError>(&json_err)
|
||||
.or_else(|_| json::from_str::<ErrorResponse>(&json_err).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let oauth2::Retry::After(d) = dlg.http_failure(&res,
|
||||
json::from_str(&json_err).ok(),
|
||||
json::from_str(&json_err).ok()) {
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
continue;
|
||||
}
|
||||
@@ -19761,9 +20097,15 @@ impl<'a, C, A> ProjectAgentIntentCreateCall<'a, C, A> where C: BorrowMut<hyper::
|
||||
if !res.status.is_success() {
|
||||
let mut json_err = String::new();
|
||||
res.read_to_string(&mut json_err).unwrap();
|
||||
|
||||
let json_server_error = json::from_str::<JsonServerError>(&json_err).ok();
|
||||
let server_error = json::from_str::<ServerError>(&json_err)
|
||||
.or_else(|_| json::from_str::<ErrorResponse>(&json_err).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let oauth2::Retry::After(d) = dlg.http_failure(&res,
|
||||
json::from_str(&json_err).ok(),
|
||||
json::from_str(&json_err).ok()) {
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
continue;
|
||||
}
|
||||
@@ -20061,9 +20403,15 @@ impl<'a, C, A> ProjectOperationListCall<'a, C, A> where C: BorrowMut<hyper::Clie
|
||||
if !res.status.is_success() {
|
||||
let mut json_err = String::new();
|
||||
res.read_to_string(&mut json_err).unwrap();
|
||||
|
||||
let json_server_error = json::from_str::<JsonServerError>(&json_err).ok();
|
||||
let server_error = json::from_str::<ServerError>(&json_err)
|
||||
.or_else(|_| json::from_str::<ErrorResponse>(&json_err).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let oauth2::Retry::After(d) = dlg.http_failure(&res,
|
||||
json::from_str(&json_err).ok(),
|
||||
json::from_str(&json_err).ok()) {
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user