mirror of
https://github.com/OMGeeky/google-apis-rs.git
synced 2026-02-13 21:19:05 +01:00
regen with patch #265, but without version bump
Let's try to avoid spamming crates.io and instead keep publishing everything as is. The patch will be present in some of the more recent crates, and for specific crates like youtube3 and drive3 I will create specific patch releases.
This commit is contained in:
@@ -1022,25 +1022,15 @@ impl<'a, C> ProjectLocationInstanceApplyParameterCall<'a, C> where C: BorrowMut<
|
||||
return Err(client::Error::HttpError(err))
|
||||
}
|
||||
Ok(mut res) => {
|
||||
let (res_parts, res_body) = res.into_parts();
|
||||
let res_body_string: String = String::from_utf8(
|
||||
hyper::body::to_bytes(res_body)
|
||||
.await
|
||||
.unwrap()
|
||||
.into_iter()
|
||||
.collect(),
|
||||
)
|
||||
.unwrap();
|
||||
let reconstructed_result =
|
||||
hyper::Response::from_parts(res_parts, res_body_string.clone().into());
|
||||
if !res.status().is_success() {
|
||||
let res_body_string = client::get_body_as_string(res.body_mut()).await;
|
||||
|
||||
if !reconstructed_result.status().is_success() {
|
||||
let json_server_error = json::from_str::<client::JsonServerError>(&res_body_string).ok();
|
||||
let server_error = json::from_str::<client::ServerError>(&res_body_string)
|
||||
.or_else(|_| json::from_str::<client::ErrorResponse>(&res_body_string).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let client::Retry::After(d) = dlg.http_failure(&reconstructed_result,
|
||||
if let client::Retry::After(d) = dlg.http_failure(&res,
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
@@ -1048,13 +1038,15 @@ impl<'a, C> ProjectLocationInstanceApplyParameterCall<'a, C> where C: BorrowMut<
|
||||
}
|
||||
dlg.finished(false);
|
||||
return match json::from_str::<client::ErrorResponse>(&res_body_string){
|
||||
Err(_) => Err(client::Error::Failure(reconstructed_result)),
|
||||
Err(_) => Err(client::Error::Failure(res)),
|
||||
Ok(serr) => Err(client::Error::BadRequest(serr))
|
||||
}
|
||||
}
|
||||
let result_value = {
|
||||
let res_body_string = client::get_body_as_string(res.body_mut()).await;
|
||||
|
||||
match json::from_str(&res_body_string) {
|
||||
Ok(decoded) => (reconstructed_result, decoded),
|
||||
Ok(decoded) => (res, decoded),
|
||||
Err(err) => {
|
||||
dlg.response_json_decode_error(&res_body_string, &err);
|
||||
return Err(client::Error::JsonDecodeError(res_body_string, err));
|
||||
@@ -1319,25 +1311,15 @@ impl<'a, C> ProjectLocationInstanceApplySoftwareUpdateCall<'a, C> where C: Borro
|
||||
return Err(client::Error::HttpError(err))
|
||||
}
|
||||
Ok(mut res) => {
|
||||
let (res_parts, res_body) = res.into_parts();
|
||||
let res_body_string: String = String::from_utf8(
|
||||
hyper::body::to_bytes(res_body)
|
||||
.await
|
||||
.unwrap()
|
||||
.into_iter()
|
||||
.collect(),
|
||||
)
|
||||
.unwrap();
|
||||
let reconstructed_result =
|
||||
hyper::Response::from_parts(res_parts, res_body_string.clone().into());
|
||||
if !res.status().is_success() {
|
||||
let res_body_string = client::get_body_as_string(res.body_mut()).await;
|
||||
|
||||
if !reconstructed_result.status().is_success() {
|
||||
let json_server_error = json::from_str::<client::JsonServerError>(&res_body_string).ok();
|
||||
let server_error = json::from_str::<client::ServerError>(&res_body_string)
|
||||
.or_else(|_| json::from_str::<client::ErrorResponse>(&res_body_string).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let client::Retry::After(d) = dlg.http_failure(&reconstructed_result,
|
||||
if let client::Retry::After(d) = dlg.http_failure(&res,
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
@@ -1345,13 +1327,15 @@ impl<'a, C> ProjectLocationInstanceApplySoftwareUpdateCall<'a, C> where C: Borro
|
||||
}
|
||||
dlg.finished(false);
|
||||
return match json::from_str::<client::ErrorResponse>(&res_body_string){
|
||||
Err(_) => Err(client::Error::Failure(reconstructed_result)),
|
||||
Err(_) => Err(client::Error::Failure(res)),
|
||||
Ok(serr) => Err(client::Error::BadRequest(serr))
|
||||
}
|
||||
}
|
||||
let result_value = {
|
||||
let res_body_string = client::get_body_as_string(res.body_mut()).await;
|
||||
|
||||
match json::from_str(&res_body_string) {
|
||||
Ok(decoded) => (reconstructed_result, decoded),
|
||||
Ok(decoded) => (res, decoded),
|
||||
Err(err) => {
|
||||
dlg.response_json_decode_error(&res_body_string, &err);
|
||||
return Err(client::Error::JsonDecodeError(res_body_string, err));
|
||||
@@ -1621,25 +1605,15 @@ impl<'a, C> ProjectLocationInstanceCreateCall<'a, C> where C: BorrowMut<hyper::C
|
||||
return Err(client::Error::HttpError(err))
|
||||
}
|
||||
Ok(mut res) => {
|
||||
let (res_parts, res_body) = res.into_parts();
|
||||
let res_body_string: String = String::from_utf8(
|
||||
hyper::body::to_bytes(res_body)
|
||||
.await
|
||||
.unwrap()
|
||||
.into_iter()
|
||||
.collect(),
|
||||
)
|
||||
.unwrap();
|
||||
let reconstructed_result =
|
||||
hyper::Response::from_parts(res_parts, res_body_string.clone().into());
|
||||
if !res.status().is_success() {
|
||||
let res_body_string = client::get_body_as_string(res.body_mut()).await;
|
||||
|
||||
if !reconstructed_result.status().is_success() {
|
||||
let json_server_error = json::from_str::<client::JsonServerError>(&res_body_string).ok();
|
||||
let server_error = json::from_str::<client::ServerError>(&res_body_string)
|
||||
.or_else(|_| json::from_str::<client::ErrorResponse>(&res_body_string).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let client::Retry::After(d) = dlg.http_failure(&reconstructed_result,
|
||||
if let client::Retry::After(d) = dlg.http_failure(&res,
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
@@ -1647,13 +1621,15 @@ impl<'a, C> ProjectLocationInstanceCreateCall<'a, C> where C: BorrowMut<hyper::C
|
||||
}
|
||||
dlg.finished(false);
|
||||
return match json::from_str::<client::ErrorResponse>(&res_body_string){
|
||||
Err(_) => Err(client::Error::Failure(reconstructed_result)),
|
||||
Err(_) => Err(client::Error::Failure(res)),
|
||||
Ok(serr) => Err(client::Error::BadRequest(serr))
|
||||
}
|
||||
}
|
||||
let result_value = {
|
||||
let res_body_string = client::get_body_as_string(res.body_mut()).await;
|
||||
|
||||
match json::from_str(&res_body_string) {
|
||||
Ok(decoded) => (reconstructed_result, decoded),
|
||||
Ok(decoded) => (res, decoded),
|
||||
Err(err) => {
|
||||
dlg.response_json_decode_error(&res_body_string, &err);
|
||||
return Err(client::Error::JsonDecodeError(res_body_string, err));
|
||||
@@ -1904,25 +1880,15 @@ impl<'a, C> ProjectLocationInstanceDeleteCall<'a, C> where C: BorrowMut<hyper::C
|
||||
return Err(client::Error::HttpError(err))
|
||||
}
|
||||
Ok(mut res) => {
|
||||
let (res_parts, res_body) = res.into_parts();
|
||||
let res_body_string: String = String::from_utf8(
|
||||
hyper::body::to_bytes(res_body)
|
||||
.await
|
||||
.unwrap()
|
||||
.into_iter()
|
||||
.collect(),
|
||||
)
|
||||
.unwrap();
|
||||
let reconstructed_result =
|
||||
hyper::Response::from_parts(res_parts, res_body_string.clone().into());
|
||||
if !res.status().is_success() {
|
||||
let res_body_string = client::get_body_as_string(res.body_mut()).await;
|
||||
|
||||
if !reconstructed_result.status().is_success() {
|
||||
let json_server_error = json::from_str::<client::JsonServerError>(&res_body_string).ok();
|
||||
let server_error = json::from_str::<client::ServerError>(&res_body_string)
|
||||
.or_else(|_| json::from_str::<client::ErrorResponse>(&res_body_string).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let client::Retry::After(d) = dlg.http_failure(&reconstructed_result,
|
||||
if let client::Retry::After(d) = dlg.http_failure(&res,
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
@@ -1930,13 +1896,15 @@ impl<'a, C> ProjectLocationInstanceDeleteCall<'a, C> where C: BorrowMut<hyper::C
|
||||
}
|
||||
dlg.finished(false);
|
||||
return match json::from_str::<client::ErrorResponse>(&res_body_string){
|
||||
Err(_) => Err(client::Error::Failure(reconstructed_result)),
|
||||
Err(_) => Err(client::Error::Failure(res)),
|
||||
Ok(serr) => Err(client::Error::BadRequest(serr))
|
||||
}
|
||||
}
|
||||
let result_value = {
|
||||
let res_body_string = client::get_body_as_string(res.body_mut()).await;
|
||||
|
||||
match json::from_str(&res_body_string) {
|
||||
Ok(decoded) => (reconstructed_result, decoded),
|
||||
Ok(decoded) => (res, decoded),
|
||||
Err(err) => {
|
||||
dlg.response_json_decode_error(&res_body_string, &err);
|
||||
return Err(client::Error::JsonDecodeError(res_body_string, err));
|
||||
@@ -2171,25 +2139,15 @@ impl<'a, C> ProjectLocationInstanceGetCall<'a, C> where C: BorrowMut<hyper::Clie
|
||||
return Err(client::Error::HttpError(err))
|
||||
}
|
||||
Ok(mut res) => {
|
||||
let (res_parts, res_body) = res.into_parts();
|
||||
let res_body_string: String = String::from_utf8(
|
||||
hyper::body::to_bytes(res_body)
|
||||
.await
|
||||
.unwrap()
|
||||
.into_iter()
|
||||
.collect(),
|
||||
)
|
||||
.unwrap();
|
||||
let reconstructed_result =
|
||||
hyper::Response::from_parts(res_parts, res_body_string.clone().into());
|
||||
if !res.status().is_success() {
|
||||
let res_body_string = client::get_body_as_string(res.body_mut()).await;
|
||||
|
||||
if !reconstructed_result.status().is_success() {
|
||||
let json_server_error = json::from_str::<client::JsonServerError>(&res_body_string).ok();
|
||||
let server_error = json::from_str::<client::ServerError>(&res_body_string)
|
||||
.or_else(|_| json::from_str::<client::ErrorResponse>(&res_body_string).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let client::Retry::After(d) = dlg.http_failure(&reconstructed_result,
|
||||
if let client::Retry::After(d) = dlg.http_failure(&res,
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
@@ -2197,13 +2155,15 @@ impl<'a, C> ProjectLocationInstanceGetCall<'a, C> where C: BorrowMut<hyper::Clie
|
||||
}
|
||||
dlg.finished(false);
|
||||
return match json::from_str::<client::ErrorResponse>(&res_body_string){
|
||||
Err(_) => Err(client::Error::Failure(reconstructed_result)),
|
||||
Err(_) => Err(client::Error::Failure(res)),
|
||||
Ok(serr) => Err(client::Error::BadRequest(serr))
|
||||
}
|
||||
}
|
||||
let result_value = {
|
||||
let res_body_string = client::get_body_as_string(res.body_mut()).await;
|
||||
|
||||
match json::from_str(&res_body_string) {
|
||||
Ok(decoded) => (reconstructed_result, decoded),
|
||||
Ok(decoded) => (res, decoded),
|
||||
Err(err) => {
|
||||
dlg.response_json_decode_error(&res_body_string, &err);
|
||||
return Err(client::Error::JsonDecodeError(res_body_string, err));
|
||||
@@ -2458,25 +2418,15 @@ impl<'a, C> ProjectLocationInstanceListCall<'a, C> where C: BorrowMut<hyper::Cli
|
||||
return Err(client::Error::HttpError(err))
|
||||
}
|
||||
Ok(mut res) => {
|
||||
let (res_parts, res_body) = res.into_parts();
|
||||
let res_body_string: String = String::from_utf8(
|
||||
hyper::body::to_bytes(res_body)
|
||||
.await
|
||||
.unwrap()
|
||||
.into_iter()
|
||||
.collect(),
|
||||
)
|
||||
.unwrap();
|
||||
let reconstructed_result =
|
||||
hyper::Response::from_parts(res_parts, res_body_string.clone().into());
|
||||
if !res.status().is_success() {
|
||||
let res_body_string = client::get_body_as_string(res.body_mut()).await;
|
||||
|
||||
if !reconstructed_result.status().is_success() {
|
||||
let json_server_error = json::from_str::<client::JsonServerError>(&res_body_string).ok();
|
||||
let server_error = json::from_str::<client::ServerError>(&res_body_string)
|
||||
.or_else(|_| json::from_str::<client::ErrorResponse>(&res_body_string).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let client::Retry::After(d) = dlg.http_failure(&reconstructed_result,
|
||||
if let client::Retry::After(d) = dlg.http_failure(&res,
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
@@ -2484,13 +2434,15 @@ impl<'a, C> ProjectLocationInstanceListCall<'a, C> where C: BorrowMut<hyper::Cli
|
||||
}
|
||||
dlg.finished(false);
|
||||
return match json::from_str::<client::ErrorResponse>(&res_body_string){
|
||||
Err(_) => Err(client::Error::Failure(reconstructed_result)),
|
||||
Err(_) => Err(client::Error::Failure(res)),
|
||||
Ok(serr) => Err(client::Error::BadRequest(serr))
|
||||
}
|
||||
}
|
||||
let result_value = {
|
||||
let res_body_string = client::get_body_as_string(res.body_mut()).await;
|
||||
|
||||
match json::from_str(&res_body_string) {
|
||||
Ok(decoded) => (reconstructed_result, decoded),
|
||||
Ok(decoded) => (res, decoded),
|
||||
Err(err) => {
|
||||
dlg.response_json_decode_error(&res_body_string, &err);
|
||||
return Err(client::Error::JsonDecodeError(res_body_string, err));
|
||||
@@ -2779,25 +2731,15 @@ impl<'a, C> ProjectLocationInstancePatchCall<'a, C> where C: BorrowMut<hyper::Cl
|
||||
return Err(client::Error::HttpError(err))
|
||||
}
|
||||
Ok(mut res) => {
|
||||
let (res_parts, res_body) = res.into_parts();
|
||||
let res_body_string: String = String::from_utf8(
|
||||
hyper::body::to_bytes(res_body)
|
||||
.await
|
||||
.unwrap()
|
||||
.into_iter()
|
||||
.collect(),
|
||||
)
|
||||
.unwrap();
|
||||
let reconstructed_result =
|
||||
hyper::Response::from_parts(res_parts, res_body_string.clone().into());
|
||||
if !res.status().is_success() {
|
||||
let res_body_string = client::get_body_as_string(res.body_mut()).await;
|
||||
|
||||
if !reconstructed_result.status().is_success() {
|
||||
let json_server_error = json::from_str::<client::JsonServerError>(&res_body_string).ok();
|
||||
let server_error = json::from_str::<client::ServerError>(&res_body_string)
|
||||
.or_else(|_| json::from_str::<client::ErrorResponse>(&res_body_string).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let client::Retry::After(d) = dlg.http_failure(&reconstructed_result,
|
||||
if let client::Retry::After(d) = dlg.http_failure(&res,
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
@@ -2805,13 +2747,15 @@ impl<'a, C> ProjectLocationInstancePatchCall<'a, C> where C: BorrowMut<hyper::Cl
|
||||
}
|
||||
dlg.finished(false);
|
||||
return match json::from_str::<client::ErrorResponse>(&res_body_string){
|
||||
Err(_) => Err(client::Error::Failure(reconstructed_result)),
|
||||
Err(_) => Err(client::Error::Failure(res)),
|
||||
Ok(serr) => Err(client::Error::BadRequest(serr))
|
||||
}
|
||||
}
|
||||
let result_value = {
|
||||
let res_body_string = client::get_body_as_string(res.body_mut()).await;
|
||||
|
||||
match json::from_str(&res_body_string) {
|
||||
Ok(decoded) => (reconstructed_result, decoded),
|
||||
Ok(decoded) => (res, decoded),
|
||||
Err(err) => {
|
||||
dlg.response_json_decode_error(&res_body_string, &err);
|
||||
return Err(client::Error::JsonDecodeError(res_body_string, err));
|
||||
@@ -3083,25 +3027,15 @@ impl<'a, C> ProjectLocationInstanceUpdateParameterCall<'a, C> where C: BorrowMut
|
||||
return Err(client::Error::HttpError(err))
|
||||
}
|
||||
Ok(mut res) => {
|
||||
let (res_parts, res_body) = res.into_parts();
|
||||
let res_body_string: String = String::from_utf8(
|
||||
hyper::body::to_bytes(res_body)
|
||||
.await
|
||||
.unwrap()
|
||||
.into_iter()
|
||||
.collect(),
|
||||
)
|
||||
.unwrap();
|
||||
let reconstructed_result =
|
||||
hyper::Response::from_parts(res_parts, res_body_string.clone().into());
|
||||
if !res.status().is_success() {
|
||||
let res_body_string = client::get_body_as_string(res.body_mut()).await;
|
||||
|
||||
if !reconstructed_result.status().is_success() {
|
||||
let json_server_error = json::from_str::<client::JsonServerError>(&res_body_string).ok();
|
||||
let server_error = json::from_str::<client::ServerError>(&res_body_string)
|
||||
.or_else(|_| json::from_str::<client::ErrorResponse>(&res_body_string).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let client::Retry::After(d) = dlg.http_failure(&reconstructed_result,
|
||||
if let client::Retry::After(d) = dlg.http_failure(&res,
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
@@ -3109,13 +3043,15 @@ impl<'a, C> ProjectLocationInstanceUpdateParameterCall<'a, C> where C: BorrowMut
|
||||
}
|
||||
dlg.finished(false);
|
||||
return match json::from_str::<client::ErrorResponse>(&res_body_string){
|
||||
Err(_) => Err(client::Error::Failure(reconstructed_result)),
|
||||
Err(_) => Err(client::Error::Failure(res)),
|
||||
Ok(serr) => Err(client::Error::BadRequest(serr))
|
||||
}
|
||||
}
|
||||
let result_value = {
|
||||
let res_body_string = client::get_body_as_string(res.body_mut()).await;
|
||||
|
||||
match json::from_str(&res_body_string) {
|
||||
Ok(decoded) => (reconstructed_result, decoded),
|
||||
Ok(decoded) => (res, decoded),
|
||||
Err(err) => {
|
||||
dlg.response_json_decode_error(&res_body_string, &err);
|
||||
return Err(client::Error::JsonDecodeError(res_body_string, err));
|
||||
@@ -3380,25 +3316,15 @@ impl<'a, C> ProjectLocationOperationCancelCall<'a, C> where C: BorrowMut<hyper::
|
||||
return Err(client::Error::HttpError(err))
|
||||
}
|
||||
Ok(mut res) => {
|
||||
let (res_parts, res_body) = res.into_parts();
|
||||
let res_body_string: String = String::from_utf8(
|
||||
hyper::body::to_bytes(res_body)
|
||||
.await
|
||||
.unwrap()
|
||||
.into_iter()
|
||||
.collect(),
|
||||
)
|
||||
.unwrap();
|
||||
let reconstructed_result =
|
||||
hyper::Response::from_parts(res_parts, res_body_string.clone().into());
|
||||
if !res.status().is_success() {
|
||||
let res_body_string = client::get_body_as_string(res.body_mut()).await;
|
||||
|
||||
if !reconstructed_result.status().is_success() {
|
||||
let json_server_error = json::from_str::<client::JsonServerError>(&res_body_string).ok();
|
||||
let server_error = json::from_str::<client::ServerError>(&res_body_string)
|
||||
.or_else(|_| json::from_str::<client::ErrorResponse>(&res_body_string).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let client::Retry::After(d) = dlg.http_failure(&reconstructed_result,
|
||||
if let client::Retry::After(d) = dlg.http_failure(&res,
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
@@ -3406,13 +3332,15 @@ impl<'a, C> ProjectLocationOperationCancelCall<'a, C> where C: BorrowMut<hyper::
|
||||
}
|
||||
dlg.finished(false);
|
||||
return match json::from_str::<client::ErrorResponse>(&res_body_string){
|
||||
Err(_) => Err(client::Error::Failure(reconstructed_result)),
|
||||
Err(_) => Err(client::Error::Failure(res)),
|
||||
Ok(serr) => Err(client::Error::BadRequest(serr))
|
||||
}
|
||||
}
|
||||
let result_value = {
|
||||
let res_body_string = client::get_body_as_string(res.body_mut()).await;
|
||||
|
||||
match json::from_str(&res_body_string) {
|
||||
Ok(decoded) => (reconstructed_result, decoded),
|
||||
Ok(decoded) => (res, decoded),
|
||||
Err(err) => {
|
||||
dlg.response_json_decode_error(&res_body_string, &err);
|
||||
return Err(client::Error::JsonDecodeError(res_body_string, err));
|
||||
@@ -3656,25 +3584,15 @@ impl<'a, C> ProjectLocationOperationDeleteCall<'a, C> where C: BorrowMut<hyper::
|
||||
return Err(client::Error::HttpError(err))
|
||||
}
|
||||
Ok(mut res) => {
|
||||
let (res_parts, res_body) = res.into_parts();
|
||||
let res_body_string: String = String::from_utf8(
|
||||
hyper::body::to_bytes(res_body)
|
||||
.await
|
||||
.unwrap()
|
||||
.into_iter()
|
||||
.collect(),
|
||||
)
|
||||
.unwrap();
|
||||
let reconstructed_result =
|
||||
hyper::Response::from_parts(res_parts, res_body_string.clone().into());
|
||||
if !res.status().is_success() {
|
||||
let res_body_string = client::get_body_as_string(res.body_mut()).await;
|
||||
|
||||
if !reconstructed_result.status().is_success() {
|
||||
let json_server_error = json::from_str::<client::JsonServerError>(&res_body_string).ok();
|
||||
let server_error = json::from_str::<client::ServerError>(&res_body_string)
|
||||
.or_else(|_| json::from_str::<client::ErrorResponse>(&res_body_string).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let client::Retry::After(d) = dlg.http_failure(&reconstructed_result,
|
||||
if let client::Retry::After(d) = dlg.http_failure(&res,
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
@@ -3682,13 +3600,15 @@ impl<'a, C> ProjectLocationOperationDeleteCall<'a, C> where C: BorrowMut<hyper::
|
||||
}
|
||||
dlg.finished(false);
|
||||
return match json::from_str::<client::ErrorResponse>(&res_body_string){
|
||||
Err(_) => Err(client::Error::Failure(reconstructed_result)),
|
||||
Err(_) => Err(client::Error::Failure(res)),
|
||||
Ok(serr) => Err(client::Error::BadRequest(serr))
|
||||
}
|
||||
}
|
||||
let result_value = {
|
||||
let res_body_string = client::get_body_as_string(res.body_mut()).await;
|
||||
|
||||
match json::from_str(&res_body_string) {
|
||||
Ok(decoded) => (reconstructed_result, decoded),
|
||||
Ok(decoded) => (res, decoded),
|
||||
Err(err) => {
|
||||
dlg.response_json_decode_error(&res_body_string, &err);
|
||||
return Err(client::Error::JsonDecodeError(res_body_string, err));
|
||||
@@ -3923,25 +3843,15 @@ impl<'a, C> ProjectLocationOperationGetCall<'a, C> where C: BorrowMut<hyper::Cli
|
||||
return Err(client::Error::HttpError(err))
|
||||
}
|
||||
Ok(mut res) => {
|
||||
let (res_parts, res_body) = res.into_parts();
|
||||
let res_body_string: String = String::from_utf8(
|
||||
hyper::body::to_bytes(res_body)
|
||||
.await
|
||||
.unwrap()
|
||||
.into_iter()
|
||||
.collect(),
|
||||
)
|
||||
.unwrap();
|
||||
let reconstructed_result =
|
||||
hyper::Response::from_parts(res_parts, res_body_string.clone().into());
|
||||
if !res.status().is_success() {
|
||||
let res_body_string = client::get_body_as_string(res.body_mut()).await;
|
||||
|
||||
if !reconstructed_result.status().is_success() {
|
||||
let json_server_error = json::from_str::<client::JsonServerError>(&res_body_string).ok();
|
||||
let server_error = json::from_str::<client::ServerError>(&res_body_string)
|
||||
.or_else(|_| json::from_str::<client::ErrorResponse>(&res_body_string).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let client::Retry::After(d) = dlg.http_failure(&reconstructed_result,
|
||||
if let client::Retry::After(d) = dlg.http_failure(&res,
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
@@ -3949,13 +3859,15 @@ impl<'a, C> ProjectLocationOperationGetCall<'a, C> where C: BorrowMut<hyper::Cli
|
||||
}
|
||||
dlg.finished(false);
|
||||
return match json::from_str::<client::ErrorResponse>(&res_body_string){
|
||||
Err(_) => Err(client::Error::Failure(reconstructed_result)),
|
||||
Err(_) => Err(client::Error::Failure(res)),
|
||||
Ok(serr) => Err(client::Error::BadRequest(serr))
|
||||
}
|
||||
}
|
||||
let result_value = {
|
||||
let res_body_string = client::get_body_as_string(res.body_mut()).await;
|
||||
|
||||
match json::from_str(&res_body_string) {
|
||||
Ok(decoded) => (reconstructed_result, decoded),
|
||||
Ok(decoded) => (res, decoded),
|
||||
Err(err) => {
|
||||
dlg.response_json_decode_error(&res_body_string, &err);
|
||||
return Err(client::Error::JsonDecodeError(res_body_string, err));
|
||||
@@ -4205,25 +4117,15 @@ impl<'a, C> ProjectLocationOperationListCall<'a, C> where C: BorrowMut<hyper::Cl
|
||||
return Err(client::Error::HttpError(err))
|
||||
}
|
||||
Ok(mut res) => {
|
||||
let (res_parts, res_body) = res.into_parts();
|
||||
let res_body_string: String = String::from_utf8(
|
||||
hyper::body::to_bytes(res_body)
|
||||
.await
|
||||
.unwrap()
|
||||
.into_iter()
|
||||
.collect(),
|
||||
)
|
||||
.unwrap();
|
||||
let reconstructed_result =
|
||||
hyper::Response::from_parts(res_parts, res_body_string.clone().into());
|
||||
if !res.status().is_success() {
|
||||
let res_body_string = client::get_body_as_string(res.body_mut()).await;
|
||||
|
||||
if !reconstructed_result.status().is_success() {
|
||||
let json_server_error = json::from_str::<client::JsonServerError>(&res_body_string).ok();
|
||||
let server_error = json::from_str::<client::ServerError>(&res_body_string)
|
||||
.or_else(|_| json::from_str::<client::ErrorResponse>(&res_body_string).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let client::Retry::After(d) = dlg.http_failure(&reconstructed_result,
|
||||
if let client::Retry::After(d) = dlg.http_failure(&res,
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
@@ -4231,13 +4133,15 @@ impl<'a, C> ProjectLocationOperationListCall<'a, C> where C: BorrowMut<hyper::Cl
|
||||
}
|
||||
dlg.finished(false);
|
||||
return match json::from_str::<client::ErrorResponse>(&res_body_string){
|
||||
Err(_) => Err(client::Error::Failure(reconstructed_result)),
|
||||
Err(_) => Err(client::Error::Failure(res)),
|
||||
Ok(serr) => Err(client::Error::BadRequest(serr))
|
||||
}
|
||||
}
|
||||
let result_value = {
|
||||
let res_body_string = client::get_body_as_string(res.body_mut()).await;
|
||||
|
||||
match json::from_str(&res_body_string) {
|
||||
Ok(decoded) => (reconstructed_result, decoded),
|
||||
Ok(decoded) => (res, decoded),
|
||||
Err(err) => {
|
||||
dlg.response_json_decode_error(&res_body_string, &err);
|
||||
return Err(client::Error::JsonDecodeError(res_body_string, err));
|
||||
@@ -4493,25 +4397,15 @@ impl<'a, C> ProjectLocationGetCall<'a, C> where C: BorrowMut<hyper::Client<hyper
|
||||
return Err(client::Error::HttpError(err))
|
||||
}
|
||||
Ok(mut res) => {
|
||||
let (res_parts, res_body) = res.into_parts();
|
||||
let res_body_string: String = String::from_utf8(
|
||||
hyper::body::to_bytes(res_body)
|
||||
.await
|
||||
.unwrap()
|
||||
.into_iter()
|
||||
.collect(),
|
||||
)
|
||||
.unwrap();
|
||||
let reconstructed_result =
|
||||
hyper::Response::from_parts(res_parts, res_body_string.clone().into());
|
||||
if !res.status().is_success() {
|
||||
let res_body_string = client::get_body_as_string(res.body_mut()).await;
|
||||
|
||||
if !reconstructed_result.status().is_success() {
|
||||
let json_server_error = json::from_str::<client::JsonServerError>(&res_body_string).ok();
|
||||
let server_error = json::from_str::<client::ServerError>(&res_body_string)
|
||||
.or_else(|_| json::from_str::<client::ErrorResponse>(&res_body_string).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let client::Retry::After(d) = dlg.http_failure(&reconstructed_result,
|
||||
if let client::Retry::After(d) = dlg.http_failure(&res,
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
@@ -4519,13 +4413,15 @@ impl<'a, C> ProjectLocationGetCall<'a, C> where C: BorrowMut<hyper::Client<hyper
|
||||
}
|
||||
dlg.finished(false);
|
||||
return match json::from_str::<client::ErrorResponse>(&res_body_string){
|
||||
Err(_) => Err(client::Error::Failure(reconstructed_result)),
|
||||
Err(_) => Err(client::Error::Failure(res)),
|
||||
Ok(serr) => Err(client::Error::BadRequest(serr))
|
||||
}
|
||||
}
|
||||
let result_value = {
|
||||
let res_body_string = client::get_body_as_string(res.body_mut()).await;
|
||||
|
||||
match json::from_str(&res_body_string) {
|
||||
Ok(decoded) => (reconstructed_result, decoded),
|
||||
Ok(decoded) => (res, decoded),
|
||||
Err(err) => {
|
||||
dlg.response_json_decode_error(&res_body_string, &err);
|
||||
return Err(client::Error::JsonDecodeError(res_body_string, err));
|
||||
@@ -4775,25 +4671,15 @@ impl<'a, C> ProjectLocationListCall<'a, C> where C: BorrowMut<hyper::Client<hype
|
||||
return Err(client::Error::HttpError(err))
|
||||
}
|
||||
Ok(mut res) => {
|
||||
let (res_parts, res_body) = res.into_parts();
|
||||
let res_body_string: String = String::from_utf8(
|
||||
hyper::body::to_bytes(res_body)
|
||||
.await
|
||||
.unwrap()
|
||||
.into_iter()
|
||||
.collect(),
|
||||
)
|
||||
.unwrap();
|
||||
let reconstructed_result =
|
||||
hyper::Response::from_parts(res_parts, res_body_string.clone().into());
|
||||
if !res.status().is_success() {
|
||||
let res_body_string = client::get_body_as_string(res.body_mut()).await;
|
||||
|
||||
if !reconstructed_result.status().is_success() {
|
||||
let json_server_error = json::from_str::<client::JsonServerError>(&res_body_string).ok();
|
||||
let server_error = json::from_str::<client::ServerError>(&res_body_string)
|
||||
.or_else(|_| json::from_str::<client::ErrorResponse>(&res_body_string).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let client::Retry::After(d) = dlg.http_failure(&reconstructed_result,
|
||||
if let client::Retry::After(d) = dlg.http_failure(&res,
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
@@ -4801,13 +4687,15 @@ impl<'a, C> ProjectLocationListCall<'a, C> where C: BorrowMut<hyper::Client<hype
|
||||
}
|
||||
dlg.finished(false);
|
||||
return match json::from_str::<client::ErrorResponse>(&res_body_string){
|
||||
Err(_) => Err(client::Error::Failure(reconstructed_result)),
|
||||
Err(_) => Err(client::Error::Failure(res)),
|
||||
Ok(serr) => Err(client::Error::BadRequest(serr))
|
||||
}
|
||||
}
|
||||
let result_value = {
|
||||
let res_body_string = client::get_body_as_string(res.body_mut()).await;
|
||||
|
||||
match json::from_str(&res_body_string) {
|
||||
Ok(decoded) => (reconstructed_result, decoded),
|
||||
Ok(decoded) => (res, decoded),
|
||||
Err(err) => {
|
||||
dlg.response_json_decode_error(&res_body_string, &err);
|
||||
return Err(client::Error::JsonDecodeError(res_body_string, err));
|
||||
|
||||
Reference in New Issue
Block a user