jni-android-sys 0.0.10

Autogenerated glue code for access Android JVM APIs from Rust
// WARNING:  This file was autogenerated by jni-bindgen.  Any changes to this file may be lost!!!


#[cfg(any(feature = "all", feature = "android-speech-tts-TextToSpeech_EngineInfo"))]
__jni_bindgen! {
    /// public class [TextToSpeech.EngineInfo](https://developer.android.com/reference/android/speech/tts/TextToSpeech.EngineInfo.html)
    ///
    /// Required feature: "android-speech-tts-TextToSpeech_EngineInfo"
    public class TextToSpeech_EngineInfo ("android/speech/tts/TextToSpeech$EngineInfo") extends crate::java::lang::Object {

        /// [EngineInfo](https://developer.android.com/reference/android/speech/tts/TextToSpeech.EngineInfo.html#EngineInfo())
        pub fn new<'env>(__jni_env: &'env __jni_bindgen::Env) -> __jni_bindgen::std::result::Result<__jni_bindgen::Local<'env, crate::android::speech::tts::TextToSpeech_EngineInfo>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/speech/tts/TextToSpeech$EngineInfo", java.flags == PUBLIC, .name == "<init>", .descriptor == "()V"
            unsafe {
                let __jni_args = [];
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/speech/tts/TextToSpeech$EngineInfo\0", "<init>\0", "()V\0");
                __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [toString](https://developer.android.com/reference/android/speech/tts/TextToSpeech.EngineInfo.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 == "android/speech/tts/TextToSpeech$EngineInfo", 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("android/speech/tts/TextToSpeech$EngineInfo\0", "toString\0", "()Ljava/lang/String;\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// **get** public [icon](https://developer.android.com/reference/android/speech/tts/TextToSpeech.EngineInfo.html#icon)
        pub fn icon<'env>(&'env self) -> i32 {
            unsafe {
                let env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_field) = env.require_class_field("android/speech/tts/TextToSpeech$EngineInfo\0", "icon\0", "I\0");
                env.get_int_field(self.0.object, __jni_field)
            }
        }

        /// **set** public [icon](https://developer.android.com/reference/android/speech/tts/TextToSpeech.EngineInfo.html#icon)
        pub fn set_icon<'env>(&'env self, value: i32) {
            unsafe {
                let env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_field) = env.require_class_field("android/speech/tts/TextToSpeech$EngineInfo\0", "icon\0", "I\0");
                env.set_int_field(self.0.object, __jni_field, value)
            }
        }

        /// **get** public [label](https://developer.android.com/reference/android/speech/tts/TextToSpeech.EngineInfo.html#label)
        ///
        /// Required feature: "java-lang-String"
        #[cfg(any(feature = "all", feature = "java-lang-String"))]
        pub fn label<'env>(&'env self) -> __jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::lang::String>> {
            unsafe {
                let env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_field) = env.require_class_field("android/speech/tts/TextToSpeech$EngineInfo\0", "label\0", "Ljava/lang/String;\0");
                env.get_object_field(self.0.object, __jni_field)
            }
        }

        /// **set** public [label](https://developer.android.com/reference/android/speech/tts/TextToSpeech.EngineInfo.html#label)
        ///
        /// Required feature: "java-lang-String"
        #[cfg(any(feature = "all", feature = "java-lang-String"))]
        pub fn set_label<'env, 'obj>(&'env self, value: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'obj crate::java::lang::String>>) {
            unsafe {
                let env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_field) = env.require_class_field("android/speech/tts/TextToSpeech$EngineInfo\0", "label\0", "Ljava/lang/String;\0");
                env.set_object_field(self.0.object, __jni_field, value)
            }
        }

        /// **get** public [name](https://developer.android.com/reference/android/speech/tts/TextToSpeech.EngineInfo.html#name)
        ///
        /// Required feature: "java-lang-String"
        #[cfg(any(feature = "all", feature = "java-lang-String"))]
        pub fn name<'env>(&'env self) -> __jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::lang::String>> {
            unsafe {
                let env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_field) = env.require_class_field("android/speech/tts/TextToSpeech$EngineInfo\0", "name\0", "Ljava/lang/String;\0");
                env.get_object_field(self.0.object, __jni_field)
            }
        }

        /// **set** public [name](https://developer.android.com/reference/android/speech/tts/TextToSpeech.EngineInfo.html#name)
        ///
        /// Required feature: "java-lang-String"
        #[cfg(any(feature = "all", feature = "java-lang-String"))]
        pub fn set_name<'env, 'obj>(&'env self, value: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'obj crate::java::lang::String>>) {
            unsafe {
                let env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_field) = env.require_class_field("android/speech/tts/TextToSpeech$EngineInfo\0", "name\0", "Ljava/lang/String;\0");
                env.set_object_field(self.0.object, __jni_field, value)
            }
        }
    }
}