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-net-DhcpInfo"))]
__jni_bindgen! {
    /// public class [DhcpInfo](https://developer.android.com/reference/android/net/DhcpInfo.html)
    ///
    /// Required feature: "android-net-DhcpInfo"
    public class DhcpInfo ("android/net/DhcpInfo") extends crate::java::lang::Object, implements crate::android::os::Parcelable {

        /// [DhcpInfo](https://developer.android.com/reference/android/net/DhcpInfo.html#DhcpInfo())
        pub fn new<'env>(__jni_env: &'env __jni_bindgen::Env) -> __jni_bindgen::std::result::Result<__jni_bindgen::Local<'env, crate::android::net::DhcpInfo>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/net/DhcpInfo", java.flags == PUBLIC, .name == "<init>", .descriptor == "()V"
            unsafe {
                let __jni_args = [];
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/net/DhcpInfo\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/net/DhcpInfo.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/net/DhcpInfo", 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/net/DhcpInfo\0", "toString\0", "()Ljava/lang/String;\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [describeContents](https://developer.android.com/reference/android/net/DhcpInfo.html#describeContents())
        pub fn describeContents<'env>(&'env self) -> __jni_bindgen::std::result::Result<i32, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/net/DhcpInfo", java.flags == PUBLIC, .name == "describeContents", .descriptor == "()I"
            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/net/DhcpInfo\0", "describeContents\0", "()I\0");
                __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [writeToParcel](https://developer.android.com/reference/android/net/DhcpInfo.html#writeToParcel(android.os.Parcel,%20int))
        ///
        /// Required features: "android-os-Parcel"
        #[cfg(any(feature = "all", all(feature = "android-os-Parcel")))]
        pub fn writeToParcel<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::os::Parcel>>, arg1: i32) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/net/DhcpInfo", java.flags == PUBLIC, .name == "writeToParcel", .descriptor == "(Landroid/os/Parcel;I)V"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into()), __jni_bindgen::AsJValue::as_jvalue(&arg1)];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/net/DhcpInfo\0", "writeToParcel\0", "(Landroid/os/Parcel;I)V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// **get** public [dns1](https://developer.android.com/reference/android/net/DhcpInfo.html#dns1)
        pub fn dns1<'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/net/DhcpInfo\0", "dns1\0", "I\0");
                env.get_int_field(self.0.object, __jni_field)
            }
        }

        /// **set** public [dns1](https://developer.android.com/reference/android/net/DhcpInfo.html#dns1)
        pub fn set_dns1<'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/net/DhcpInfo\0", "dns1\0", "I\0");
                env.set_int_field(self.0.object, __jni_field, value)
            }
        }

        /// **get** public [dns2](https://developer.android.com/reference/android/net/DhcpInfo.html#dns2)
        pub fn dns2<'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/net/DhcpInfo\0", "dns2\0", "I\0");
                env.get_int_field(self.0.object, __jni_field)
            }
        }

        /// **set** public [dns2](https://developer.android.com/reference/android/net/DhcpInfo.html#dns2)
        pub fn set_dns2<'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/net/DhcpInfo\0", "dns2\0", "I\0");
                env.set_int_field(self.0.object, __jni_field, value)
            }
        }

        /// **get** public [gateway](https://developer.android.com/reference/android/net/DhcpInfo.html#gateway)
        pub fn gateway<'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/net/DhcpInfo\0", "gateway\0", "I\0");
                env.get_int_field(self.0.object, __jni_field)
            }
        }

        /// **set** public [gateway](https://developer.android.com/reference/android/net/DhcpInfo.html#gateway)
        pub fn set_gateway<'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/net/DhcpInfo\0", "gateway\0", "I\0");
                env.set_int_field(self.0.object, __jni_field, value)
            }
        }

        /// **get** public [ipAddress](https://developer.android.com/reference/android/net/DhcpInfo.html#ipAddress)
        pub fn ipAddress<'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/net/DhcpInfo\0", "ipAddress\0", "I\0");
                env.get_int_field(self.0.object, __jni_field)
            }
        }

        /// **set** public [ipAddress](https://developer.android.com/reference/android/net/DhcpInfo.html#ipAddress)
        pub fn set_ipAddress<'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/net/DhcpInfo\0", "ipAddress\0", "I\0");
                env.set_int_field(self.0.object, __jni_field, value)
            }
        }

        /// **get** public [leaseDuration](https://developer.android.com/reference/android/net/DhcpInfo.html#leaseDuration)
        pub fn leaseDuration<'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/net/DhcpInfo\0", "leaseDuration\0", "I\0");
                env.get_int_field(self.0.object, __jni_field)
            }
        }

        /// **set** public [leaseDuration](https://developer.android.com/reference/android/net/DhcpInfo.html#leaseDuration)
        pub fn set_leaseDuration<'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/net/DhcpInfo\0", "leaseDuration\0", "I\0");
                env.set_int_field(self.0.object, __jni_field, value)
            }
        }

        /// **get** public [netmask](https://developer.android.com/reference/android/net/DhcpInfo.html#netmask)
        pub fn netmask<'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/net/DhcpInfo\0", "netmask\0", "I\0");
                env.get_int_field(self.0.object, __jni_field)
            }
        }

        /// **set** public [netmask](https://developer.android.com/reference/android/net/DhcpInfo.html#netmask)
        pub fn set_netmask<'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/net/DhcpInfo\0", "netmask\0", "I\0");
                env.set_int_field(self.0.object, __jni_field, value)
            }
        }

        /// **get** public [serverAddress](https://developer.android.com/reference/android/net/DhcpInfo.html#serverAddress)
        pub fn serverAddress<'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/net/DhcpInfo\0", "serverAddress\0", "I\0");
                env.get_int_field(self.0.object, __jni_field)
            }
        }

        /// **set** public [serverAddress](https://developer.android.com/reference/android/net/DhcpInfo.html#serverAddress)
        pub fn set_serverAddress<'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/net/DhcpInfo\0", "serverAddress\0", "I\0");
                env.set_int_field(self.0.object, __jni_field, value)
            }
        }
    }
}