azure_security_keyvault_keys 0.3.0

Rust wrappers around Microsoft Azure REST APIs - Azure Key Vault Keys
Documentation
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// Licensed under the MIT License. See License.txt in the project root for license information.
// Code generated by Microsoft (R) Rust Code Generator. DO NOT EDIT.

use super::{
    CreateKeyParameters, GetRandomBytesParameters, ImportKeyParameters, KeyOperationParameters,
    KeyRotationPolicy, ReleaseParameters, RestoreKeyParameters, SignParameters,
    UpdateKeyPropertiesParameters, VerifyParameters,
};
use azure_core::{http::RequestContent, json::to_json, Result};

impl TryFrom<CreateKeyParameters> for RequestContent<CreateKeyParameters> {
    type Error = azure_core::Error;
    fn try_from(value: CreateKeyParameters) -> Result<Self> {
        RequestContent::try_from(to_json(&value)?)
    }
}

impl TryFrom<GetRandomBytesParameters> for RequestContent<GetRandomBytesParameters> {
    type Error = azure_core::Error;
    fn try_from(value: GetRandomBytesParameters) -> Result<Self> {
        RequestContent::try_from(to_json(&value)?)
    }
}

impl TryFrom<ImportKeyParameters> for RequestContent<ImportKeyParameters> {
    type Error = azure_core::Error;
    fn try_from(value: ImportKeyParameters) -> Result<Self> {
        RequestContent::try_from(to_json(&value)?)
    }
}

impl TryFrom<KeyOperationParameters> for RequestContent<KeyOperationParameters> {
    type Error = azure_core::Error;
    fn try_from(value: KeyOperationParameters) -> Result<Self> {
        RequestContent::try_from(to_json(&value)?)
    }
}

impl TryFrom<KeyRotationPolicy> for RequestContent<KeyRotationPolicy> {
    type Error = azure_core::Error;
    fn try_from(value: KeyRotationPolicy) -> Result<Self> {
        RequestContent::try_from(to_json(&value)?)
    }
}

impl TryFrom<ReleaseParameters> for RequestContent<ReleaseParameters> {
    type Error = azure_core::Error;
    fn try_from(value: ReleaseParameters) -> Result<Self> {
        RequestContent::try_from(to_json(&value)?)
    }
}

impl TryFrom<RestoreKeyParameters> for RequestContent<RestoreKeyParameters> {
    type Error = azure_core::Error;
    fn try_from(value: RestoreKeyParameters) -> Result<Self> {
        RequestContent::try_from(to_json(&value)?)
    }
}

impl TryFrom<SignParameters> for RequestContent<SignParameters> {
    type Error = azure_core::Error;
    fn try_from(value: SignParameters) -> Result<Self> {
        RequestContent::try_from(to_json(&value)?)
    }
}

impl TryFrom<UpdateKeyPropertiesParameters> for RequestContent<UpdateKeyPropertiesParameters> {
    type Error = azure_core::Error;
    fn try_from(value: UpdateKeyPropertiesParameters) -> Result<Self> {
        RequestContent::try_from(to_json(&value)?)
    }
}

impl TryFrom<VerifyParameters> for RequestContent<VerifyParameters> {
    type Error = azure_core::Error;
    fn try_from(value: VerifyParameters) -> Result<Self> {
        RequestContent::try_from(to_json(&value)?)
    }
}