#[non_exhaustive]pub struct UpdateOpenAPIOptionalParams {
pub openapi_spec_file: Option<Vec<u8>>,
}Expand description
UpdateOpenAPIOptionalParams is a struct for passing parameters to the method APIManagementAPI::update_open_api
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.openapi_spec_file: Option<Vec<u8>>Binary OpenAPI spec file
Implementations§
source§impl UpdateOpenAPIOptionalParams
impl UpdateOpenAPIOptionalParams
sourcepub fn openapi_spec_file(self, value: Vec<u8>) -> Self
pub fn openapi_spec_file(self, value: Vec<u8>) -> Self
Binary OpenAPI spec file
Examples found in repository?
examples/v2_api-management_UpdateOpenAPI.rs (line 19)
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
async fn main() {
// there is a valid "managed_api" in the system
let managed_api_data_id = uuid::Uuid::parse_str(&std::env::var("MANAGED_API_DATA_ID").unwrap())
.expect("Invalid UUID");
let mut configuration = datadog::Configuration::new();
configuration.set_unstable_operation_enabled("v2.UpdateOpenAPI", true);
let api = APIManagementAPI::with_config(configuration);
let resp = api
.update_open_api(
managed_api_data_id.clone(),
UpdateOpenAPIOptionalParams::default()
.openapi_spec_file(fs::read("openapi-spec.yaml").unwrap()),
)
.await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}Trait Implementations§
source§impl Clone for UpdateOpenAPIOptionalParams
impl Clone for UpdateOpenAPIOptionalParams
source§fn clone(&self) -> UpdateOpenAPIOptionalParams
fn clone(&self) -> UpdateOpenAPIOptionalParams
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for UpdateOpenAPIOptionalParams
impl Debug for UpdateOpenAPIOptionalParams
source§impl Default for UpdateOpenAPIOptionalParams
impl Default for UpdateOpenAPIOptionalParams
source§fn default() -> UpdateOpenAPIOptionalParams
fn default() -> UpdateOpenAPIOptionalParams
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for UpdateOpenAPIOptionalParams
impl RefUnwindSafe for UpdateOpenAPIOptionalParams
impl Send for UpdateOpenAPIOptionalParams
impl Sync for UpdateOpenAPIOptionalParams
impl Unpin for UpdateOpenAPIOptionalParams
impl UnwindSafe for UpdateOpenAPIOptionalParams
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)