improve builder `TryInto` failure messages for body parameters (#646)
This commit is contained in:
parent
7b241e546a
commit
4cce71069f
|
@ -1391,6 +1391,7 @@ dependencies = [
|
|||
"schemars",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"tokio",
|
||||
"uuid",
|
||||
]
|
||||
|
||||
|
|
|
@ -160,10 +160,8 @@ impl FromStr for BodyContentType {
|
|||
}
|
||||
}
|
||||
|
||||
use std::fmt;
|
||||
|
||||
impl fmt::Display for BodyContentType {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
impl std::fmt::Display for BodyContentType {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
f.write_str(match self {
|
||||
Self::OctetStream => "application/octet-stream",
|
||||
Self::Json => "application/json",
|
||||
|
@ -1593,7 +1591,7 @@ impl Generator {
|
|||
unreachable!()
|
||||
}
|
||||
(None, true) => {
|
||||
let ty_ident = ty.ident();
|
||||
let typ = ty.ident();
|
||||
let err_msg = format!(
|
||||
"conversion to `{}` for {} failed",
|
||||
ty.name(),
|
||||
|
@ -1604,7 +1602,7 @@ impl Generator {
|
|||
mut self,
|
||||
value: V,
|
||||
) -> Self
|
||||
where V: std::convert::TryInto<#ty_ident>,
|
||||
where V: std::convert::TryInto<#typ>,
|
||||
{
|
||||
self.#param_name = value.try_into()
|
||||
.map(Some)
|
||||
|
@ -1643,7 +1641,7 @@ impl Generator {
|
|||
assert_eq!(param.name, "body");
|
||||
let typ = ty.ident();
|
||||
let err_msg = format!(
|
||||
"conversion to `{}` for {} failed",
|
||||
"conversion to `{}` for {} failed: {{}}",
|
||||
ty.name(),
|
||||
param.name,
|
||||
);
|
||||
|
@ -1651,10 +1649,12 @@ impl Generator {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<#typ>,
|
||||
<V as std::convert::TryInto<#typ>>::Error:
|
||||
std::fmt::Display,
|
||||
{
|
||||
self.body = value.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| #err_msg.to_string());
|
||||
.map_err(|s| format!(#err_msg, s));
|
||||
self
|
||||
}
|
||||
|
||||
|
|
|
@ -2038,11 +2038,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::TaskSubmit>,
|
||||
<V as std::convert::TryInto<types::TaskSubmit>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `TaskSubmit` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `TaskSubmit` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -2292,11 +2293,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::UserCreate>,
|
||||
<V as std::convert::TryInto<types::UserCreate>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `UserCreate` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `UserCreate` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -2438,11 +2440,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::WorkerBootstrap>,
|
||||
<V as std::convert::TryInto<types::WorkerBootstrap>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `WorkerBootstrap` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `WorkerBootstrap` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -2545,11 +2548,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::WorkerAppendTask>,
|
||||
<V as std::convert::TryInto<types::WorkerAppendTask>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `WorkerAppendTask` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `WorkerAppendTask` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -2688,11 +2692,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::WorkerCompleteTask>,
|
||||
<V as std::convert::TryInto<types::WorkerCompleteTask>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `WorkerCompleteTask` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `WorkerCompleteTask` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -2760,11 +2765,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::WorkerAddOutput>,
|
||||
<V as std::convert::TryInto<types::WorkerAddOutput>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `WorkerAddOutput` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `WorkerAddOutput` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
|
|
@ -2038,11 +2038,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::TaskSubmit>,
|
||||
<V as std::convert::TryInto<types::TaskSubmit>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `TaskSubmit` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `TaskSubmit` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -2292,11 +2293,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::UserCreate>,
|
||||
<V as std::convert::TryInto<types::UserCreate>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `UserCreate` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `UserCreate` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -2438,11 +2440,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::WorkerBootstrap>,
|
||||
<V as std::convert::TryInto<types::WorkerBootstrap>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `WorkerBootstrap` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `WorkerBootstrap` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -2545,11 +2548,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::WorkerAppendTask>,
|
||||
<V as std::convert::TryInto<types::WorkerAppendTask>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `WorkerAppendTask` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `WorkerAppendTask` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -2688,11 +2692,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::WorkerCompleteTask>,
|
||||
<V as std::convert::TryInto<types::WorkerCompleteTask>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `WorkerCompleteTask` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `WorkerCompleteTask` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -2760,11 +2765,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::WorkerAddOutput>,
|
||||
<V as std::convert::TryInto<types::WorkerAddOutput>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `WorkerAddOutput` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `WorkerAddOutput` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
|
|
@ -1092,11 +1092,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::EnrolBody>,
|
||||
<V as std::convert::TryInto<types::EnrolBody>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `EnrolBody` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `EnrolBody` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -1279,11 +1280,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::ReportFinishBody>,
|
||||
<V as std::convert::TryInto<types::ReportFinishBody>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `ReportFinishBody` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `ReportFinishBody` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -1362,11 +1364,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::ReportOutputBody>,
|
||||
<V as std::convert::TryInto<types::ReportOutputBody>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `ReportOutputBody` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `ReportOutputBody` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -1445,11 +1448,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::ReportStartBody>,
|
||||
<V as std::convert::TryInto<types::ReportStartBody>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `ReportStartBody` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `ReportStartBody` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
|
|
@ -1092,11 +1092,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::EnrolBody>,
|
||||
<V as std::convert::TryInto<types::EnrolBody>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `EnrolBody` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `EnrolBody` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -1279,11 +1280,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::ReportFinishBody>,
|
||||
<V as std::convert::TryInto<types::ReportFinishBody>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `ReportFinishBody` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `ReportFinishBody` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -1362,11 +1364,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::ReportOutputBody>,
|
||||
<V as std::convert::TryInto<types::ReportOutputBody>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `ReportOutputBody` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `ReportOutputBody` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -1445,11 +1448,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::ReportStartBody>,
|
||||
<V as std::convert::TryInto<types::ReportStartBody>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `ReportStartBody` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `ReportStartBody` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
|
|
@ -21699,11 +21699,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::DeviceAuthRequest>,
|
||||
<V as std::convert::TryInto<types::DeviceAuthRequest>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `DeviceAuthRequest` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `DeviceAuthRequest` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -21754,11 +21755,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::DeviceAuthVerify>,
|
||||
<V as std::convert::TryInto<types::DeviceAuthVerify>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `DeviceAuthVerify` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `DeviceAuthVerify` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -21823,9 +21825,13 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::DeviceAccessTokenRequest>,
|
||||
<V as std::convert::TryInto<types::DeviceAccessTokenRequest>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value.try_into().map(From::from).map_err(|_| {
|
||||
"conversion to `DeviceAccessTokenRequest` for body failed".to_string()
|
||||
self.body = value.try_into().map(From::from).map_err(|s| {
|
||||
format!(
|
||||
"conversion to `DeviceAccessTokenRequest` for body failed: {}",
|
||||
s
|
||||
)
|
||||
});
|
||||
self
|
||||
}
|
||||
|
@ -22034,11 +22040,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::SpoofLoginBody>,
|
||||
<V as std::convert::TryInto<types::SpoofLoginBody>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `SpoofLoginBody` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `SpoofLoginBody` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -22113,9 +22120,14 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::UsernamePasswordCredentials>,
|
||||
<V as std::convert::TryInto<types::UsernamePasswordCredentials>>::Error:
|
||||
std::fmt::Display,
|
||||
{
|
||||
self.body = value.try_into().map(From::from).map_err(|_| {
|
||||
"conversion to `UsernamePasswordCredentials` for body failed".to_string()
|
||||
self.body = value.try_into().map(From::from).map_err(|s| {
|
||||
format!(
|
||||
"conversion to `UsernamePasswordCredentials` for body failed: {}",
|
||||
s
|
||||
)
|
||||
});
|
||||
self
|
||||
}
|
||||
|
@ -22541,11 +22553,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::OrganizationCreate>,
|
||||
<V as std::convert::TryInto<types::OrganizationCreate>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `OrganizationCreate` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `OrganizationCreate` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -22684,11 +22697,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::OrganizationUpdate>,
|
||||
<V as std::convert::TryInto<types::OrganizationUpdate>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `OrganizationUpdate` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `OrganizationUpdate` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -22900,11 +22914,14 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::OrganizationRolePolicy>,
|
||||
<V as std::convert::TryInto<types::OrganizationRolePolicy>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `OrganizationRolePolicy` for body failed".to_string());
|
||||
self.body = value.try_into().map(From::from).map_err(|s| {
|
||||
format!(
|
||||
"conversion to `OrganizationRolePolicy` for body failed: {}",
|
||||
s
|
||||
)
|
||||
});
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -23169,11 +23186,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::ProjectCreate>,
|
||||
<V as std::convert::TryInto<types::ProjectCreate>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `ProjectCreate` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `ProjectCreate` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -23348,11 +23366,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::ProjectUpdate>,
|
||||
<V as std::convert::TryInto<types::ProjectUpdate>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `ProjectUpdate` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `ProjectUpdate` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -23722,11 +23741,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::DiskCreate>,
|
||||
<V as std::convert::TryInto<types::DiskCreate>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `DiskCreate` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `DiskCreate` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -24450,11 +24470,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::ImageCreate>,
|
||||
<V as std::convert::TryInto<types::ImageCreate>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `ImageCreate` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `ImageCreate` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -24936,11 +24957,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::InstanceCreate>,
|
||||
<V as std::convert::TryInto<types::InstanceCreate>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `InstanceCreate` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `InstanceCreate` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -25450,11 +25472,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::DiskIdentifier>,
|
||||
<V as std::convert::TryInto<types::DiskIdentifier>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `DiskIdentifier` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `DiskIdentifier` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -25570,11 +25593,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::DiskIdentifier>,
|
||||
<V as std::convert::TryInto<types::DiskIdentifier>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `DiskIdentifier` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `DiskIdentifier` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -25786,11 +25810,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::InstanceMigrate>,
|
||||
<V as std::convert::TryInto<types::InstanceMigrate>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `InstanceMigrate` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `InstanceMigrate` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -26116,11 +26141,14 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::NetworkInterfaceCreate>,
|
||||
<V as std::convert::TryInto<types::NetworkInterfaceCreate>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `NetworkInterfaceCreate` for body failed".to_string());
|
||||
self.body = value.try_into().map(From::from).map_err(|s| {
|
||||
format!(
|
||||
"conversion to `NetworkInterfaceCreate` for body failed: {}",
|
||||
s
|
||||
)
|
||||
});
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -26363,11 +26391,14 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::NetworkInterfaceUpdate>,
|
||||
<V as std::convert::TryInto<types::NetworkInterfaceUpdate>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `NetworkInterfaceUpdate` for body failed".to_string());
|
||||
self.body = value.try_into().map(From::from).map_err(|s| {
|
||||
format!(
|
||||
"conversion to `NetworkInterfaceUpdate` for body failed: {}",
|
||||
s
|
||||
)
|
||||
});
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -27198,11 +27229,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::ProjectRolePolicy>,
|
||||
<V as std::convert::TryInto<types::ProjectRolePolicy>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `ProjectRolePolicy` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `ProjectRolePolicy` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -27500,11 +27532,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::SnapshotCreate>,
|
||||
<V as std::convert::TryInto<types::SnapshotCreate>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `SnapshotCreate` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `SnapshotCreate` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -27985,11 +28018,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::VpcCreate>,
|
||||
<V as std::convert::TryInto<types::VpcCreate>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `VpcCreate` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `VpcCreate` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -28195,11 +28229,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::VpcUpdate>,
|
||||
<V as std::convert::TryInto<types::VpcUpdate>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `VpcUpdate` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `VpcUpdate` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -28505,9 +28540,14 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::VpcFirewallRuleUpdateParams>,
|
||||
<V as std::convert::TryInto<types::VpcFirewallRuleUpdateParams>>::Error:
|
||||
std::fmt::Display,
|
||||
{
|
||||
self.body = value.try_into().map(From::from).map_err(|_| {
|
||||
"conversion to `VpcFirewallRuleUpdateParams` for body failed".to_string()
|
||||
self.body = value.try_into().map(From::from).map_err(|s| {
|
||||
format!(
|
||||
"conversion to `VpcFirewallRuleUpdateParams` for body failed: {}",
|
||||
s
|
||||
)
|
||||
});
|
||||
self
|
||||
}
|
||||
|
@ -28837,11 +28877,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::VpcRouterCreate>,
|
||||
<V as std::convert::TryInto<types::VpcRouterCreate>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `VpcRouterCreate` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `VpcRouterCreate` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -29078,11 +29119,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::VpcRouterUpdate>,
|
||||
<V as std::convert::TryInto<types::VpcRouterUpdate>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `VpcRouterUpdate` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `VpcRouterUpdate` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -29546,11 +29588,14 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::RouterRouteCreateParams>,
|
||||
<V as std::convert::TryInto<types::RouterRouteCreateParams>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `RouterRouteCreateParams` for body failed".to_string());
|
||||
self.body = value.try_into().map(From::from).map_err(|s| {
|
||||
format!(
|
||||
"conversion to `RouterRouteCreateParams` for body failed: {}",
|
||||
s
|
||||
)
|
||||
});
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -29819,11 +29864,14 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::RouterRouteUpdateParams>,
|
||||
<V as std::convert::TryInto<types::RouterRouteUpdateParams>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `RouterRouteUpdateParams` for body failed".to_string());
|
||||
self.body = value.try_into().map(From::from).map_err(|s| {
|
||||
format!(
|
||||
"conversion to `RouterRouteUpdateParams` for body failed: {}",
|
||||
s
|
||||
)
|
||||
});
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -30280,11 +30328,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::VpcSubnetCreate>,
|
||||
<V as std::convert::TryInto<types::VpcSubnetCreate>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `VpcSubnetCreate` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `VpcSubnetCreate` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -30521,11 +30570,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::VpcSubnetUpdate>,
|
||||
<V as std::convert::TryInto<types::VpcSubnetUpdate>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `VpcSubnetUpdate` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `VpcSubnetUpdate` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -30984,11 +31034,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::SiloRolePolicy>,
|
||||
<V as std::convert::TryInto<types::SiloRolePolicy>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `SiloRolePolicy` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `SiloRolePolicy` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -31604,11 +31655,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::SshKeyCreate>,
|
||||
<V as std::convert::TryInto<types::SshKeyCreate>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `SshKeyCreate` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `SshKeyCreate` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -32129,11 +32181,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::CertificateCreate>,
|
||||
<V as std::convert::TryInto<types::CertificateCreate>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `CertificateCreate` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `CertificateCreate` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -33243,11 +33296,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::GlobalImageCreate>,
|
||||
<V as std::convert::TryInto<types::GlobalImageCreate>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `GlobalImageCreate` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `GlobalImageCreate` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -33587,11 +33641,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::IpPoolCreate>,
|
||||
<V as std::convert::TryInto<types::IpPoolCreate>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `IpPoolCreate` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `IpPoolCreate` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -33725,11 +33780,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::IpPoolUpdate>,
|
||||
<V as std::convert::TryInto<types::IpPoolUpdate>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `IpPoolUpdate` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `IpPoolUpdate` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -34656,11 +34712,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::FleetRolePolicy>,
|
||||
<V as std::convert::TryInto<types::FleetRolePolicy>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `FleetRolePolicy` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `FleetRolePolicy` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -35098,11 +35155,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::SiloCreate>,
|
||||
<V as std::convert::TryInto<types::SiloCreate>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `SiloCreate` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `SiloCreate` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -35473,11 +35531,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::UserCreate>,
|
||||
<V as std::convert::TryInto<types::UserCreate>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `UserCreate` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `UserCreate` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -35734,9 +35793,14 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::SamlIdentityProviderCreate>,
|
||||
<V as std::convert::TryInto<types::SamlIdentityProviderCreate>>::Error:
|
||||
std::fmt::Display,
|
||||
{
|
||||
self.body = value.try_into().map(From::from).map_err(|_| {
|
||||
"conversion to `SamlIdentityProviderCreate` for body failed".to_string()
|
||||
self.body = value.try_into().map(From::from).map_err(|s| {
|
||||
format!(
|
||||
"conversion to `SamlIdentityProviderCreate` for body failed: {}",
|
||||
s
|
||||
)
|
||||
});
|
||||
self
|
||||
}
|
||||
|
@ -35967,11 +36031,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::SiloRolePolicy>,
|
||||
<V as std::convert::TryInto<types::SiloRolePolicy>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `SiloRolePolicy` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `SiloRolePolicy` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -37030,11 +37095,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::DiskCreate>,
|
||||
<V as std::convert::TryInto<types::DiskCreate>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `DiskCreate` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `DiskCreate` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -37530,11 +37596,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::InstanceCreate>,
|
||||
<V as std::convert::TryInto<types::InstanceCreate>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `InstanceCreate` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `InstanceCreate` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -38061,11 +38128,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::DiskPath>,
|
||||
<V as std::convert::TryInto<types::DiskPath>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `DiskPath` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `DiskPath` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -38187,11 +38255,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::DiskPath>,
|
||||
<V as std::convert::TryInto<types::DiskPath>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `DiskPath` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `DiskPath` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -38313,11 +38382,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::InstanceMigrate>,
|
||||
<V as std::convert::TryInto<types::InstanceMigrate>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `InstanceMigrate` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `InstanceMigrate` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -39118,11 +39188,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::OrganizationCreate>,
|
||||
<V as std::convert::TryInto<types::OrganizationCreate>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `OrganizationCreate` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `OrganizationCreate` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -39261,11 +39332,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::OrganizationUpdate>,
|
||||
<V as std::convert::TryInto<types::OrganizationUpdate>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `OrganizationUpdate` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `OrganizationUpdate` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -39477,11 +39549,14 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::OrganizationRolePolicy>,
|
||||
<V as std::convert::TryInto<types::OrganizationRolePolicy>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `OrganizationRolePolicy` for body failed".to_string());
|
||||
self.body = value.try_into().map(From::from).map_err(|s| {
|
||||
format!(
|
||||
"conversion to `OrganizationRolePolicy` for body failed: {}",
|
||||
s
|
||||
)
|
||||
});
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -39745,11 +39820,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::ProjectCreate>,
|
||||
<V as std::convert::TryInto<types::ProjectCreate>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `ProjectCreate` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `ProjectCreate` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -39927,11 +40003,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::ProjectUpdate>,
|
||||
<V as std::convert::TryInto<types::ProjectUpdate>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `ProjectUpdate` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `ProjectUpdate` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -40201,11 +40278,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::ProjectRolePolicy>,
|
||||
<V as std::convert::TryInto<types::ProjectRolePolicy>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `ProjectRolePolicy` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `ProjectRolePolicy` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -40706,11 +40784,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::SystemUpdateStart>,
|
||||
<V as std::convert::TryInto<types::SystemUpdateStart>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `SystemUpdateStart` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `SystemUpdateStart` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
|
|
@ -21493,11 +21493,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::DeviceAuthRequest>,
|
||||
<V as std::convert::TryInto<types::DeviceAuthRequest>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `DeviceAuthRequest` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `DeviceAuthRequest` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -21548,11 +21549,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::DeviceAuthVerify>,
|
||||
<V as std::convert::TryInto<types::DeviceAuthVerify>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `DeviceAuthVerify` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `DeviceAuthVerify` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -21617,9 +21619,13 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::DeviceAccessTokenRequest>,
|
||||
<V as std::convert::TryInto<types::DeviceAccessTokenRequest>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value.try_into().map(From::from).map_err(|_| {
|
||||
"conversion to `DeviceAccessTokenRequest` for body failed".to_string()
|
||||
self.body = value.try_into().map(From::from).map_err(|s| {
|
||||
format!(
|
||||
"conversion to `DeviceAccessTokenRequest` for body failed: {}",
|
||||
s
|
||||
)
|
||||
});
|
||||
self
|
||||
}
|
||||
|
@ -21828,11 +21834,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::SpoofLoginBody>,
|
||||
<V as std::convert::TryInto<types::SpoofLoginBody>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `SpoofLoginBody` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `SpoofLoginBody` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -21907,9 +21914,14 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::UsernamePasswordCredentials>,
|
||||
<V as std::convert::TryInto<types::UsernamePasswordCredentials>>::Error:
|
||||
std::fmt::Display,
|
||||
{
|
||||
self.body = value.try_into().map(From::from).map_err(|_| {
|
||||
"conversion to `UsernamePasswordCredentials` for body failed".to_string()
|
||||
self.body = value.try_into().map(From::from).map_err(|s| {
|
||||
format!(
|
||||
"conversion to `UsernamePasswordCredentials` for body failed: {}",
|
||||
s
|
||||
)
|
||||
});
|
||||
self
|
||||
}
|
||||
|
@ -22335,11 +22347,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::OrganizationCreate>,
|
||||
<V as std::convert::TryInto<types::OrganizationCreate>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `OrganizationCreate` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `OrganizationCreate` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -22478,11 +22491,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::OrganizationUpdate>,
|
||||
<V as std::convert::TryInto<types::OrganizationUpdate>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `OrganizationUpdate` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `OrganizationUpdate` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -22694,11 +22708,14 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::OrganizationRolePolicy>,
|
||||
<V as std::convert::TryInto<types::OrganizationRolePolicy>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `OrganizationRolePolicy` for body failed".to_string());
|
||||
self.body = value.try_into().map(From::from).map_err(|s| {
|
||||
format!(
|
||||
"conversion to `OrganizationRolePolicy` for body failed: {}",
|
||||
s
|
||||
)
|
||||
});
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -22963,11 +22980,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::ProjectCreate>,
|
||||
<V as std::convert::TryInto<types::ProjectCreate>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `ProjectCreate` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `ProjectCreate` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -23142,11 +23160,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::ProjectUpdate>,
|
||||
<V as std::convert::TryInto<types::ProjectUpdate>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `ProjectUpdate` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `ProjectUpdate` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -23516,11 +23535,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::DiskCreate>,
|
||||
<V as std::convert::TryInto<types::DiskCreate>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `DiskCreate` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `DiskCreate` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -24244,11 +24264,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::ImageCreate>,
|
||||
<V as std::convert::TryInto<types::ImageCreate>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `ImageCreate` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `ImageCreate` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -24730,11 +24751,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::InstanceCreate>,
|
||||
<V as std::convert::TryInto<types::InstanceCreate>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `InstanceCreate` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `InstanceCreate` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -25244,11 +25266,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::DiskIdentifier>,
|
||||
<V as std::convert::TryInto<types::DiskIdentifier>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `DiskIdentifier` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `DiskIdentifier` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -25364,11 +25387,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::DiskIdentifier>,
|
||||
<V as std::convert::TryInto<types::DiskIdentifier>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `DiskIdentifier` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `DiskIdentifier` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -25580,11 +25604,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::InstanceMigrate>,
|
||||
<V as std::convert::TryInto<types::InstanceMigrate>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `InstanceMigrate` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `InstanceMigrate` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -25910,11 +25935,14 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::NetworkInterfaceCreate>,
|
||||
<V as std::convert::TryInto<types::NetworkInterfaceCreate>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `NetworkInterfaceCreate` for body failed".to_string());
|
||||
self.body = value.try_into().map(From::from).map_err(|s| {
|
||||
format!(
|
||||
"conversion to `NetworkInterfaceCreate` for body failed: {}",
|
||||
s
|
||||
)
|
||||
});
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -26157,11 +26185,14 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::NetworkInterfaceUpdate>,
|
||||
<V as std::convert::TryInto<types::NetworkInterfaceUpdate>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `NetworkInterfaceUpdate` for body failed".to_string());
|
||||
self.body = value.try_into().map(From::from).map_err(|s| {
|
||||
format!(
|
||||
"conversion to `NetworkInterfaceUpdate` for body failed: {}",
|
||||
s
|
||||
)
|
||||
});
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -26992,11 +27023,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::ProjectRolePolicy>,
|
||||
<V as std::convert::TryInto<types::ProjectRolePolicy>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `ProjectRolePolicy` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `ProjectRolePolicy` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -27294,11 +27326,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::SnapshotCreate>,
|
||||
<V as std::convert::TryInto<types::SnapshotCreate>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `SnapshotCreate` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `SnapshotCreate` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -27779,11 +27812,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::VpcCreate>,
|
||||
<V as std::convert::TryInto<types::VpcCreate>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `VpcCreate` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `VpcCreate` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -27989,11 +28023,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::VpcUpdate>,
|
||||
<V as std::convert::TryInto<types::VpcUpdate>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `VpcUpdate` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `VpcUpdate` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -28299,9 +28334,14 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::VpcFirewallRuleUpdateParams>,
|
||||
<V as std::convert::TryInto<types::VpcFirewallRuleUpdateParams>>::Error:
|
||||
std::fmt::Display,
|
||||
{
|
||||
self.body = value.try_into().map(From::from).map_err(|_| {
|
||||
"conversion to `VpcFirewallRuleUpdateParams` for body failed".to_string()
|
||||
self.body = value.try_into().map(From::from).map_err(|s| {
|
||||
format!(
|
||||
"conversion to `VpcFirewallRuleUpdateParams` for body failed: {}",
|
||||
s
|
||||
)
|
||||
});
|
||||
self
|
||||
}
|
||||
|
@ -28631,11 +28671,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::VpcRouterCreate>,
|
||||
<V as std::convert::TryInto<types::VpcRouterCreate>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `VpcRouterCreate` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `VpcRouterCreate` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -28872,11 +28913,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::VpcRouterUpdate>,
|
||||
<V as std::convert::TryInto<types::VpcRouterUpdate>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `VpcRouterUpdate` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `VpcRouterUpdate` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -29340,11 +29382,14 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::RouterRouteCreateParams>,
|
||||
<V as std::convert::TryInto<types::RouterRouteCreateParams>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `RouterRouteCreateParams` for body failed".to_string());
|
||||
self.body = value.try_into().map(From::from).map_err(|s| {
|
||||
format!(
|
||||
"conversion to `RouterRouteCreateParams` for body failed: {}",
|
||||
s
|
||||
)
|
||||
});
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -29613,11 +29658,14 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::RouterRouteUpdateParams>,
|
||||
<V as std::convert::TryInto<types::RouterRouteUpdateParams>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `RouterRouteUpdateParams` for body failed".to_string());
|
||||
self.body = value.try_into().map(From::from).map_err(|s| {
|
||||
format!(
|
||||
"conversion to `RouterRouteUpdateParams` for body failed: {}",
|
||||
s
|
||||
)
|
||||
});
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -30074,11 +30122,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::VpcSubnetCreate>,
|
||||
<V as std::convert::TryInto<types::VpcSubnetCreate>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `VpcSubnetCreate` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `VpcSubnetCreate` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -30315,11 +30364,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::VpcSubnetUpdate>,
|
||||
<V as std::convert::TryInto<types::VpcSubnetUpdate>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `VpcSubnetUpdate` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `VpcSubnetUpdate` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -30778,11 +30828,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::SiloRolePolicy>,
|
||||
<V as std::convert::TryInto<types::SiloRolePolicy>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `SiloRolePolicy` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `SiloRolePolicy` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -31398,11 +31449,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::SshKeyCreate>,
|
||||
<V as std::convert::TryInto<types::SshKeyCreate>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `SshKeyCreate` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `SshKeyCreate` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -31923,11 +31975,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::CertificateCreate>,
|
||||
<V as std::convert::TryInto<types::CertificateCreate>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `CertificateCreate` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `CertificateCreate` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -33037,11 +33090,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::GlobalImageCreate>,
|
||||
<V as std::convert::TryInto<types::GlobalImageCreate>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `GlobalImageCreate` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `GlobalImageCreate` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -33381,11 +33435,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::IpPoolCreate>,
|
||||
<V as std::convert::TryInto<types::IpPoolCreate>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `IpPoolCreate` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `IpPoolCreate` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -33519,11 +33574,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::IpPoolUpdate>,
|
||||
<V as std::convert::TryInto<types::IpPoolUpdate>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `IpPoolUpdate` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `IpPoolUpdate` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -34450,11 +34506,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::FleetRolePolicy>,
|
||||
<V as std::convert::TryInto<types::FleetRolePolicy>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `FleetRolePolicy` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `FleetRolePolicy` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -34892,11 +34949,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::SiloCreate>,
|
||||
<V as std::convert::TryInto<types::SiloCreate>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `SiloCreate` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `SiloCreate` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -35267,11 +35325,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::UserCreate>,
|
||||
<V as std::convert::TryInto<types::UserCreate>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `UserCreate` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `UserCreate` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -35528,9 +35587,14 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::SamlIdentityProviderCreate>,
|
||||
<V as std::convert::TryInto<types::SamlIdentityProviderCreate>>::Error:
|
||||
std::fmt::Display,
|
||||
{
|
||||
self.body = value.try_into().map(From::from).map_err(|_| {
|
||||
"conversion to `SamlIdentityProviderCreate` for body failed".to_string()
|
||||
self.body = value.try_into().map(From::from).map_err(|s| {
|
||||
format!(
|
||||
"conversion to `SamlIdentityProviderCreate` for body failed: {}",
|
||||
s
|
||||
)
|
||||
});
|
||||
self
|
||||
}
|
||||
|
@ -35761,11 +35825,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::SiloRolePolicy>,
|
||||
<V as std::convert::TryInto<types::SiloRolePolicy>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `SiloRolePolicy` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `SiloRolePolicy` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -36824,11 +36889,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::DiskCreate>,
|
||||
<V as std::convert::TryInto<types::DiskCreate>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `DiskCreate` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `DiskCreate` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -37324,11 +37390,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::InstanceCreate>,
|
||||
<V as std::convert::TryInto<types::InstanceCreate>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `InstanceCreate` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `InstanceCreate` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -37855,11 +37922,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::DiskPath>,
|
||||
<V as std::convert::TryInto<types::DiskPath>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `DiskPath` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `DiskPath` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -37981,11 +38049,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::DiskPath>,
|
||||
<V as std::convert::TryInto<types::DiskPath>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `DiskPath` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `DiskPath` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -38107,11 +38176,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::InstanceMigrate>,
|
||||
<V as std::convert::TryInto<types::InstanceMigrate>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `InstanceMigrate` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `InstanceMigrate` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -38912,11 +38982,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::OrganizationCreate>,
|
||||
<V as std::convert::TryInto<types::OrganizationCreate>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `OrganizationCreate` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `OrganizationCreate` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -39055,11 +39126,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::OrganizationUpdate>,
|
||||
<V as std::convert::TryInto<types::OrganizationUpdate>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `OrganizationUpdate` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `OrganizationUpdate` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -39271,11 +39343,14 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::OrganizationRolePolicy>,
|
||||
<V as std::convert::TryInto<types::OrganizationRolePolicy>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `OrganizationRolePolicy` for body failed".to_string());
|
||||
self.body = value.try_into().map(From::from).map_err(|s| {
|
||||
format!(
|
||||
"conversion to `OrganizationRolePolicy` for body failed: {}",
|
||||
s
|
||||
)
|
||||
});
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -39539,11 +39614,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::ProjectCreate>,
|
||||
<V as std::convert::TryInto<types::ProjectCreate>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `ProjectCreate` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `ProjectCreate` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -39721,11 +39797,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::ProjectUpdate>,
|
||||
<V as std::convert::TryInto<types::ProjectUpdate>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `ProjectUpdate` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `ProjectUpdate` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -39995,11 +40072,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::ProjectRolePolicy>,
|
||||
<V as std::convert::TryInto<types::ProjectRolePolicy>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `ProjectRolePolicy` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `ProjectRolePolicy` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -40500,11 +40578,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::SystemUpdateStart>,
|
||||
<V as std::convert::TryInto<types::SystemUpdateStart>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `SystemUpdateStart` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `SystemUpdateStart` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
|
|
@ -2170,11 +2170,14 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::InstanceEnsureRequest>,
|
||||
<V as std::convert::TryInto<types::InstanceEnsureRequest>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `InstanceEnsureRequest` for body failed".to_string());
|
||||
self.body = value.try_into().map(From::from).map_err(|s| {
|
||||
format!(
|
||||
"conversion to `InstanceEnsureRequest` for body failed: {}",
|
||||
s
|
||||
)
|
||||
});
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -2319,9 +2322,14 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::InstanceMigrateStatusRequest>,
|
||||
<V as std::convert::TryInto<types::InstanceMigrateStatusRequest>>::Error:
|
||||
std::fmt::Display,
|
||||
{
|
||||
self.body = value.try_into().map(From::from).map_err(|_| {
|
||||
"conversion to `InstanceMigrateStatusRequest` for body failed".to_string()
|
||||
self.body = value.try_into().map(From::from).map_err(|s| {
|
||||
format!(
|
||||
"conversion to `InstanceMigrateStatusRequest` for body failed: {}",
|
||||
s
|
||||
)
|
||||
});
|
||||
self
|
||||
}
|
||||
|
@ -2489,9 +2497,14 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::InstanceStateMonitorRequest>,
|
||||
<V as std::convert::TryInto<types::InstanceStateMonitorRequest>>::Error:
|
||||
std::fmt::Display,
|
||||
{
|
||||
self.body = value.try_into().map(From::from).map_err(|_| {
|
||||
"conversion to `InstanceStateMonitorRequest` for body failed".to_string()
|
||||
self.body = value.try_into().map(From::from).map_err(|s| {
|
||||
format!(
|
||||
"conversion to `InstanceStateMonitorRequest` for body failed: {}",
|
||||
s
|
||||
)
|
||||
});
|
||||
self
|
||||
}
|
||||
|
|
|
@ -2176,11 +2176,14 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::InstanceEnsureRequest>,
|
||||
<V as std::convert::TryInto<types::InstanceEnsureRequest>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `InstanceEnsureRequest` for body failed".to_string());
|
||||
self.body = value.try_into().map(From::from).map_err(|s| {
|
||||
format!(
|
||||
"conversion to `InstanceEnsureRequest` for body failed: {}",
|
||||
s
|
||||
)
|
||||
});
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -2325,9 +2328,14 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::InstanceMigrateStatusRequest>,
|
||||
<V as std::convert::TryInto<types::InstanceMigrateStatusRequest>>::Error:
|
||||
std::fmt::Display,
|
||||
{
|
||||
self.body = value.try_into().map(From::from).map_err(|_| {
|
||||
"conversion to `InstanceMigrateStatusRequest` for body failed".to_string()
|
||||
self.body = value.try_into().map(From::from).map_err(|s| {
|
||||
format!(
|
||||
"conversion to `InstanceMigrateStatusRequest` for body failed: {}",
|
||||
s
|
||||
)
|
||||
});
|
||||
self
|
||||
}
|
||||
|
@ -2495,9 +2503,14 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::InstanceStateMonitorRequest>,
|
||||
<V as std::convert::TryInto<types::InstanceStateMonitorRequest>>::Error:
|
||||
std::fmt::Display,
|
||||
{
|
||||
self.body = value.try_into().map(From::from).map_err(|_| {
|
||||
"conversion to `InstanceStateMonitorRequest` for body failed".to_string()
|
||||
self.body = value.try_into().map(From::from).map_err(|s| {
|
||||
format!(
|
||||
"conversion to `InstanceStateMonitorRequest` for body failed: {}",
|
||||
s
|
||||
)
|
||||
});
|
||||
self
|
||||
}
|
||||
|
|
|
@ -324,11 +324,12 @@ pub mod builder {
|
|||
pub fn body<V>(mut self, value: V) -> Self
|
||||
where
|
||||
V: std::convert::TryInto<types::BodyWithDefaults>,
|
||||
<V as std::convert::TryInto<types::BodyWithDefaults>>::Error: std::fmt::Display,
|
||||
{
|
||||
self.body = value
|
||||
.try_into()
|
||||
.map(From::from)
|
||||
.map_err(|_| "conversion to `BodyWithDefaults` for body failed".to_string());
|
||||
.map_err(|s| format!("conversion to `BodyWithDefaults` for body failed: {}", s));
|
||||
self
|
||||
}
|
||||
|
||||
|
|
|
@ -26,3 +26,4 @@ reqwest = { version = "0.11.22", features = ["json", "stream"] }
|
|||
schemars = { version = "0.8.12", features = ["uuid1"] }
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
uuid = { version = "1.6", features = ["serde", "v4"] }
|
||||
tokio = "*"
|
|
@ -85,6 +85,8 @@ mod builder_tagged {
|
|||
|
||||
use nexus_client::prelude::*;
|
||||
|
||||
use self::nexus_client::types;
|
||||
|
||||
async fn _ignore() {
|
||||
let client = Client::new("");
|
||||
let stream = client
|
||||
|
@ -103,4 +105,15 @@ mod builder_tagged {
|
|||
.send()
|
||||
.await;
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[should_panic = "called `Result::unwrap()` on an `Err` value: Invalid Request: conversion to `SiloCreate` for body failed: no value supplied for description"]
|
||||
async fn test_decent_error_from_body_builder() {
|
||||
let _ = Client::new("")
|
||||
.silo_create()
|
||||
.body(types::SiloCreate::builder())
|
||||
.send()
|
||||
.await
|
||||
.unwrap();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue