azure_security_keyvault_keys 0.4.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 azure_core::{fmt::SafeDebug, http::ClientMethodOptions};

/// Options to be passed to [`KeyClient::backup_key()`](crate::generated::clients::KeyClient::backup_key())
#[derive(Clone, Default, SafeDebug)]
pub struct KeyClientBackupKeyOptions<'a> {
    /// Allows customization of the method call.
    pub method_options: ClientMethodOptions<'a>,
}

/// Options to be passed to [`KeyClient::create_key()`](crate::generated::clients::KeyClient::create_key())
#[derive(Clone, Default, SafeDebug)]
pub struct KeyClientCreateKeyOptions<'a> {
    /// Allows customization of the method call.
    pub method_options: ClientMethodOptions<'a>,
}

/// Options to be passed to [`KeyClient::decrypt()`](crate::generated::clients::KeyClient::decrypt())
#[derive(Clone, Default, SafeDebug)]
pub struct KeyClientDecryptOptions<'a> {
    /// Allows customization of the method call.
    pub method_options: ClientMethodOptions<'a>,
}

/// Options to be passed to [`KeyClient::delete_key()`](crate::generated::clients::KeyClient::delete_key())
#[derive(Clone, Default, SafeDebug)]
pub struct KeyClientDeleteKeyOptions<'a> {
    /// Allows customization of the method call.
    pub method_options: ClientMethodOptions<'a>,
}

/// Options to be passed to [`KeyClient::encrypt()`](crate::generated::clients::KeyClient::encrypt())
#[derive(Clone, Default, SafeDebug)]
pub struct KeyClientEncryptOptions<'a> {
    /// Allows customization of the method call.
    pub method_options: ClientMethodOptions<'a>,
}

/// Options to be passed to [`KeyClient::get_deleted_key()`](crate::generated::clients::KeyClient::get_deleted_key())
#[derive(Clone, Default, SafeDebug)]
pub struct KeyClientGetDeletedKeyOptions<'a> {
    /// Allows customization of the method call.
    pub method_options: ClientMethodOptions<'a>,
}

/// Options to be passed to [`KeyClient::get_key()`](crate::generated::clients::KeyClient::get_key())
#[derive(Clone, Default, SafeDebug)]
pub struct KeyClientGetKeyOptions<'a> {
    /// Allows customization of the method call.
    pub method_options: ClientMethodOptions<'a>,
}

/// Options to be passed to [`KeyClient::get_key_attestation()`](crate::generated::clients::KeyClient::get_key_attestation())
#[derive(Clone, Default, SafeDebug)]
pub struct KeyClientGetKeyAttestationOptions<'a> {
    /// Allows customization of the method call.
    pub method_options: ClientMethodOptions<'a>,
}

/// Options to be passed to [`KeyClient::get_key_rotation_policy()`](crate::generated::clients::KeyClient::get_key_rotation_policy())
#[derive(Clone, Default, SafeDebug)]
pub struct KeyClientGetKeyRotationPolicyOptions<'a> {
    /// Allows customization of the method call.
    pub method_options: ClientMethodOptions<'a>,
}

/// Options to be passed to [`KeyClient::get_random_bytes()`](crate::generated::clients::KeyClient::get_random_bytes())
#[derive(Clone, Default, SafeDebug)]
pub struct KeyClientGetRandomBytesOptions<'a> {
    /// Allows customization of the method call.
    pub method_options: ClientMethodOptions<'a>,
}

/// Options to be passed to [`KeyClient::import_key()`](crate::generated::clients::KeyClient::import_key())
#[derive(Clone, Default, SafeDebug)]
pub struct KeyClientImportKeyOptions<'a> {
    /// Allows customization of the method call.
    pub method_options: ClientMethodOptions<'a>,
}

/// Options to be passed to [`KeyClient::list_deleted_key_properties()`](crate::generated::clients::KeyClient::list_deleted_key_properties())
#[derive(Clone, Default, SafeDebug)]
pub struct KeyClientListDeletedKeyPropertiesOptions<'a> {
    /// Maximum number of results to return in a page. If not specified the service will return up to 25 results.
    pub maxresults: Option<i32>,

    /// Allows customization of the method call.
    pub method_options: ClientMethodOptions<'a>,
}

impl KeyClientListDeletedKeyPropertiesOptions<'_> {
    pub fn into_owned(self) -> KeyClientListDeletedKeyPropertiesOptions<'static> {
        KeyClientListDeletedKeyPropertiesOptions {
            maxresults: self.maxresults,
            method_options: ClientMethodOptions {
                context: self.method_options.context.into_owned(),
            },
        }
    }
}

/// Options to be passed to [`KeyClient::list_key_properties()`](crate::generated::clients::KeyClient::list_key_properties())
#[derive(Clone, Default, SafeDebug)]
pub struct KeyClientListKeyPropertiesOptions<'a> {
    /// Maximum number of results to return in a page. If not specified the service will return up to 25 results.
    pub maxresults: Option<i32>,

    /// Allows customization of the method call.
    pub method_options: ClientMethodOptions<'a>,
}

impl KeyClientListKeyPropertiesOptions<'_> {
    pub fn into_owned(self) -> KeyClientListKeyPropertiesOptions<'static> {
        KeyClientListKeyPropertiesOptions {
            maxresults: self.maxresults,
            method_options: ClientMethodOptions {
                context: self.method_options.context.into_owned(),
            },
        }
    }
}

/// Options to be passed to [`KeyClient::list_key_properties_versions()`](crate::generated::clients::KeyClient::list_key_properties_versions())
#[derive(Clone, Default, SafeDebug)]
pub struct KeyClientListKeyPropertiesVersionsOptions<'a> {
    /// Maximum number of results to return in a page. If not specified the service will return up to 25 results.
    pub maxresults: Option<i32>,

    /// Allows customization of the method call.
    pub method_options: ClientMethodOptions<'a>,
}

impl KeyClientListKeyPropertiesVersionsOptions<'_> {
    pub fn into_owned(self) -> KeyClientListKeyPropertiesVersionsOptions<'static> {
        KeyClientListKeyPropertiesVersionsOptions {
            maxresults: self.maxresults,
            method_options: ClientMethodOptions {
                context: self.method_options.context.into_owned(),
            },
        }
    }
}

/// Options to be passed to [`KeyClient::purge_deleted_key()`](crate::generated::clients::KeyClient::purge_deleted_key())
#[derive(Clone, Default, SafeDebug)]
pub struct KeyClientPurgeDeletedKeyOptions<'a> {
    /// Allows customization of the method call.
    pub method_options: ClientMethodOptions<'a>,
}

/// Options to be passed to [`KeyClient::recover_deleted_key()`](crate::generated::clients::KeyClient::recover_deleted_key())
#[derive(Clone, Default, SafeDebug)]
pub struct KeyClientRecoverDeletedKeyOptions<'a> {
    /// Allows customization of the method call.
    pub method_options: ClientMethodOptions<'a>,
}

/// Options to be passed to [`KeyClient::release()`](crate::generated::clients::KeyClient::release())
#[derive(Clone, Default, SafeDebug)]
pub struct KeyClientReleaseOptions<'a> {
    /// Allows customization of the method call.
    pub method_options: ClientMethodOptions<'a>,
}

/// Options to be passed to [`KeyClient::restore_key()`](crate::generated::clients::KeyClient::restore_key())
#[derive(Clone, Default, SafeDebug)]
pub struct KeyClientRestoreKeyOptions<'a> {
    /// Allows customization of the method call.
    pub method_options: ClientMethodOptions<'a>,
}

/// Options to be passed to [`KeyClient::rotate_key()`](crate::generated::clients::KeyClient::rotate_key())
#[derive(Clone, Default, SafeDebug)]
pub struct KeyClientRotateKeyOptions<'a> {
    /// Allows customization of the method call.
    pub method_options: ClientMethodOptions<'a>,
}

/// Options to be passed to [`KeyClient::sign()`](crate::generated::clients::KeyClient::sign())
#[derive(Clone, Default, SafeDebug)]
pub struct KeyClientSignOptions<'a> {
    /// Allows customization of the method call.
    pub method_options: ClientMethodOptions<'a>,
}

/// Options to be passed to [`KeyClient::unwrap_key()`](crate::generated::clients::KeyClient::unwrap_key())
#[derive(Clone, Default, SafeDebug)]
pub struct KeyClientUnwrapKeyOptions<'a> {
    /// Allows customization of the method call.
    pub method_options: ClientMethodOptions<'a>,
}

/// Options to be passed to [`KeyClient::update_key_properties()`](crate::generated::clients::KeyClient::update_key_properties())
#[derive(Clone, Default, SafeDebug)]
pub struct KeyClientUpdateKeyPropertiesOptions<'a> {
    /// Allows customization of the method call.
    pub method_options: ClientMethodOptions<'a>,
}

/// Options to be passed to [`KeyClient::update_key_rotation_policy()`](crate::generated::clients::KeyClient::update_key_rotation_policy())
#[derive(Clone, Default, SafeDebug)]
pub struct KeyClientUpdateKeyRotationPolicyOptions<'a> {
    /// Allows customization of the method call.
    pub method_options: ClientMethodOptions<'a>,
}

/// Options to be passed to [`KeyClient::verify()`](crate::generated::clients::KeyClient::verify())
#[derive(Clone, Default, SafeDebug)]
pub struct KeyClientVerifyOptions<'a> {
    /// Allows customization of the method call.
    pub method_options: ClientMethodOptions<'a>,
}

/// Options to be passed to [`KeyClient::wrap_key()`](crate::generated::clients::KeyClient::wrap_key())
#[derive(Clone, Default, SafeDebug)]
pub struct KeyClientWrapKeyOptions<'a> {
    /// Allows customization of the method call.
    pub method_options: ClientMethodOptions<'a>,
}