#[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)
8async fn main() {
9 // there is a valid "managed_api" in the system
10 let managed_api_data_id = uuid::Uuid::parse_str(&std::env::var("MANAGED_API_DATA_ID").unwrap())
11 .expect("Invalid UUID");
12 let mut configuration = datadog::Configuration::new();
13 configuration.set_unstable_operation_enabled("v2.UpdateOpenAPI", true);
14 let api = APIManagementAPI::with_config(configuration);
15 let resp = api
16 .update_open_api(
17 managed_api_data_id.clone(),
18 UpdateOpenAPIOptionalParams::default()
19 .openapi_spec_file(fs::read("openapi-spec.yaml").unwrap()),
20 )
21 .await;
22 if let Ok(value) = resp {
23 println!("{:#?}", value);
24 } else {
25 println!("{:#?}", resp.unwrap_err());
26 }
27}
Trait Implementations§
Source§impl Clone for UpdateOpenAPIOptionalParams
impl Clone for UpdateOpenAPIOptionalParams
Source§fn clone(&self) -> UpdateOpenAPIOptionalParams
fn clone(&self) -> UpdateOpenAPIOptionalParams
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const 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