// WARNING: This file was autogenerated by jni-bindgen. Any changes to this file may be lost!!!
#[cfg(any(feature = "all", feature = "java-security-KeyStore_PrivateKeyEntry"))]
__jni_bindgen! {
/// public final class [KeyStore.PrivateKeyEntry](https://developer.android.com/reference/java/security/KeyStore.PrivateKeyEntry.html)
///
/// Required feature: "java-security-KeyStore_PrivateKeyEntry"
public final class KeyStore_PrivateKeyEntry ("java/security/KeyStore$PrivateKeyEntry") extends crate::java::lang::Object, implements crate::java::security::KeyStore_Entry {
/// [PrivateKeyEntry](https://developer.android.com/reference/java/security/KeyStore.PrivateKeyEntry.html#PrivateKeyEntry(java.security.PrivateKey,%20java.security.cert.Certificate%5B%5D))
///
/// Required features: "java-security-PrivateKey", "java-security-cert-Certificate"
#[cfg(any(feature = "all", all(feature = "java-security-PrivateKey", feature = "java-security-cert-Certificate")))]
pub fn new<'env>(__jni_env: &'env __jni_bindgen::Env, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::security::PrivateKey>>, arg1: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env __jni_bindgen::ObjectArray<crate::java::security::cert::Certificate, crate::java::lang::Throwable>>>) -> __jni_bindgen::std::result::Result<__jni_bindgen::Local<'env, crate::java::security::KeyStore_PrivateKeyEntry>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "java/security/KeyStore$PrivateKeyEntry", java.flags == PUBLIC, .name == "<init>", .descriptor == "(Ljava/security/PrivateKey;[Ljava/security/cert/Certificate;)V"
unsafe {
let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into()), __jni_bindgen::AsJValue::as_jvalue(&arg1.into())];
let (__jni_class, __jni_method) = __jni_env.require_class_method("java/security/KeyStore$PrivateKeyEntry\0", "<init>\0", "(Ljava/security/PrivateKey;[Ljava/security/cert/Certificate;)V\0");
__jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr())
}
}
/// [getPrivateKey](https://developer.android.com/reference/java/security/KeyStore.PrivateKeyEntry.html#getPrivateKey())
///
/// Required features: "java-security-PrivateKey"
#[cfg(any(feature = "all", all(feature = "java-security-PrivateKey")))]
pub fn getPrivateKey<'env>(&'env self) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::security::PrivateKey>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "java/security/KeyStore$PrivateKeyEntry", java.flags == PUBLIC, .name == "getPrivateKey", .descriptor == "()Ljava/security/PrivateKey;"
unsafe {
let __jni_args = [];
let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
let (__jni_class, __jni_method) = __jni_env.require_class_method("java/security/KeyStore$PrivateKeyEntry\0", "getPrivateKey\0", "()Ljava/security/PrivateKey;\0");
__jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
/// [getCertificateChain](https://developer.android.com/reference/java/security/KeyStore.PrivateKeyEntry.html#getCertificateChain())
///
/// Required features: "java-security-cert-Certificate"
#[cfg(any(feature = "all", all(feature = "java-security-cert-Certificate")))]
pub fn getCertificateChain<'env>(&'env self) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, __jni_bindgen::ObjectArray<crate::java::security::cert::Certificate, crate::java::lang::Throwable>>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "java/security/KeyStore$PrivateKeyEntry", java.flags == PUBLIC, .name == "getCertificateChain", .descriptor == "()[Ljava/security/cert/Certificate;"
unsafe {
let __jni_args = [];
let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
let (__jni_class, __jni_method) = __jni_env.require_class_method("java/security/KeyStore$PrivateKeyEntry\0", "getCertificateChain\0", "()[Ljava/security/cert/Certificate;\0");
__jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
/// [getCertificate](https://developer.android.com/reference/java/security/KeyStore.PrivateKeyEntry.html#getCertificate())
///
/// Required features: "java-security-cert-Certificate"
#[cfg(any(feature = "all", all(feature = "java-security-cert-Certificate")))]
pub fn getCertificate<'env>(&'env self) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::security::cert::Certificate>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "java/security/KeyStore$PrivateKeyEntry", java.flags == PUBLIC, .name == "getCertificate", .descriptor == "()Ljava/security/cert/Certificate;"
unsafe {
let __jni_args = [];
let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
let (__jni_class, __jni_method) = __jni_env.require_class_method("java/security/KeyStore$PrivateKeyEntry\0", "getCertificate\0", "()Ljava/security/cert/Certificate;\0");
__jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
/// [toString](https://developer.android.com/reference/java/security/KeyStore.PrivateKeyEntry.html#toString())
///
/// Required features: "java-lang-String"
#[cfg(any(feature = "all", all(feature = "java-lang-String")))]
pub fn toString<'env>(&'env self) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::lang::String>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "java/security/KeyStore$PrivateKeyEntry", java.flags == PUBLIC, .name == "toString", .descriptor == "()Ljava/lang/String;"
unsafe {
let __jni_args = [];
let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
let (__jni_class, __jni_method) = __jni_env.require_class_method("java/security/KeyStore$PrivateKeyEntry\0", "toString\0", "()Ljava/lang/String;\0");
__jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
}
}