azure_security_keyvault_secrets 1.0.0

Rust wrappers around Microsoft Azure REST APIs - Azure Key Vault Secrets
Documentation
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
//
// Code generated by Microsoft (R) Rust Code Generator. DO NOT EDIT.

use super::ContentType;
use azure_core::{
    fmt::SafeDebug,
    http::{pager::PagerOptions, ClientMethodOptions},
};

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

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

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

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

    /// The media type (MIME type) of the certificate. If a supported format is specified, the certificate content is converted
    /// to the requested format. Currently, only PFX to PEM conversion is supported. If an unsupported format is specified, the
    /// request is rejected. If not specified, the certificate is returned in its original format without conversion.
    pub out_content_type: Option<ContentType>,

    /// The version of the secret. This URI fragment is optional. If not specified, the latest version of the secret is returned.
    pub secret_version: Option<String>,
}

/// Options to be passed to [`SecretClient::list_deleted_secret_properties()`](crate::generated::clients::SecretClient::list_deleted_secret_properties())
#[derive(Clone, Default, SafeDebug)]
pub struct SecretClientListDeletedSecretPropertiesOptions<'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: PagerOptions<'a>,
}

impl SecretClientListDeletedSecretPropertiesOptions<'_> {
    /// Transforms this [`SecretClientListDeletedSecretPropertiesOptions`] into a new `SecretClientListDeletedSecretPropertiesOptions` that owns the underlying data, cloning it if necessary.
    pub fn into_owned(self) -> SecretClientListDeletedSecretPropertiesOptions<'static> {
        SecretClientListDeletedSecretPropertiesOptions {
            maxresults: self.maxresults,
            method_options: PagerOptions {
                context: self.method_options.context.into_owned(),
                ..self.method_options
            },
        }
    }
}

/// Options to be passed to [`SecretClient::list_secret_properties()`](crate::generated::clients::SecretClient::list_secret_properties())
#[derive(Clone, Default, SafeDebug)]
pub struct SecretClientListSecretPropertiesOptions<'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: PagerOptions<'a>,
}

impl SecretClientListSecretPropertiesOptions<'_> {
    /// Transforms this [`SecretClientListSecretPropertiesOptions`] into a new `SecretClientListSecretPropertiesOptions` that owns the underlying data, cloning it if necessary.
    pub fn into_owned(self) -> SecretClientListSecretPropertiesOptions<'static> {
        SecretClientListSecretPropertiesOptions {
            maxresults: self.maxresults,
            method_options: PagerOptions {
                context: self.method_options.context.into_owned(),
                ..self.method_options
            },
        }
    }
}

/// Options to be passed to [`SecretClient::list_secret_properties_versions()`](crate::generated::clients::SecretClient::list_secret_properties_versions())
#[derive(Clone, Default, SafeDebug)]
pub struct SecretClientListSecretPropertiesVersionsOptions<'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: PagerOptions<'a>,
}

impl SecretClientListSecretPropertiesVersionsOptions<'_> {
    /// Transforms this [`SecretClientListSecretPropertiesVersionsOptions`] into a new `SecretClientListSecretPropertiesVersionsOptions` that owns the underlying data, cloning it if necessary.
    pub fn into_owned(self) -> SecretClientListSecretPropertiesVersionsOptions<'static> {
        SecretClientListSecretPropertiesVersionsOptions {
            maxresults: self.maxresults,
            method_options: PagerOptions {
                context: self.method_options.context.into_owned(),
                ..self.method_options
            },
        }
    }
}

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

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

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

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

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

    /// The version of the secret.
    pub secret_version: Option<String>,
}