nm_rs/auto/
setting_vlan.rs

1// This file was generated by gir (https://github.com/gtk-rs/gir)
2// from gir
3// from gtk-girs (https://github.com/gtk-rs/gir-files)
4// DO NOT EDIT
5
6use crate::{ffi,Setting,VlanFlags,VlanPriorityMap};
7use glib::{prelude::*,signal::{connect_raw, SignalHandlerId},translate::*};
8use std::{boxed::Box as Box_};
9
10glib::wrapper! {
11    /// VLAN Settings
12    ///
13    /// ## Properties
14    ///
15    ///
16    /// #### `egress-priority-map`
17    ///  For outgoing packets, a list of mappings from Linux SKB priorities to
18    /// 802.1p priorities.  The mapping is given in the format "from:to" where
19    /// both "from" and "to" are unsigned integers, ie "7:3".
20    ///
21    /// Readable | Writeable
22    ///
23    ///
24    /// #### `flags`
25    ///  One or more flags which control the behavior and features of the VLAN
26    /// interface.  Flags include [`VlanFlags::REORDER_HEADERS`][crate::VlanFlags::REORDER_HEADERS] (reordering of
27    /// output packet headers), [`VlanFlags::GVRP`][crate::VlanFlags::GVRP] (use of the GVRP protocol),
28    /// and [`VlanFlags::LOOSE_BINDING`][crate::VlanFlags::LOOSE_BINDING] (loose binding of the interface to its
29    /// controller device's operating state). [`VlanFlags::MVRP`][crate::VlanFlags::MVRP] (use of the MVRP
30    /// protocol).
31    ///
32    /// The default value of this property is NM_VLAN_FLAG_REORDER_HEADERS,
33    /// but it used to be 0. To preserve backward compatibility, the default-value
34    /// in the D-Bus API continues to be 0 and a missing property on D-Bus
35    /// is still considered as 0.
36    ///
37    /// Readable | Writeable
38    ///
39    ///
40    /// #### `id`
41    ///  The VLAN identifier that the interface created by this connection should
42    /// be assigned. The valid range is from 0 to 4094, without the reserved id 4095.
43    ///
44    /// Readable | Writeable
45    ///
46    ///
47    /// #### `ingress-priority-map`
48    ///  For incoming packets, a list of mappings from 802.1p priorities to Linux
49    /// SKB priorities.  The mapping is given in the format "from:to" where both
50    /// "from" and "to" are unsigned integers, ie "7:3".
51    ///
52    /// Readable | Writeable
53    ///
54    ///
55    /// #### `parent`
56    ///  If given, specifies the parent interface name or parent connection UUID
57    /// from which this VLAN interface should be created.  If this property is
58    /// not specified, the connection must contain an #NMSettingWired setting
59    /// with a #NMSettingWired:mac-address property.
60    ///
61    /// Readable | Writeable
62    ///
63    ///
64    /// #### `protocol`
65    ///  Specifies the VLAN protocol to use for encapsulation.
66    ///
67    /// Supported values are: '802.1Q', '802.1ad'. If not specified the default
68    /// value is '802.1Q'.
69    ///
70    /// Readable | Writeable
71    /// <details><summary><h4>Setting</h4></summary>
72    ///
73    ///
74    /// #### `name`
75    ///  The setting's name, which uniquely identifies the setting within the
76    /// connection.  Each setting type has a name unique to that type, for
77    /// example "ppp" or "802-11-wireless" or "802-3-ethernet".
78    ///
79    /// Readable
80    /// </details>
81    ///
82    /// # Implements
83    ///
84    /// [`SettingExt`][trait@crate::prelude::SettingExt]
85    #[doc(alias = "NMSettingVlan")]
86    pub struct SettingVlan(Object<ffi::NMSettingVlan, ffi::NMSettingVlanClass>) @extends Setting;
87
88    match fn {
89        type_ => || ffi::nm_setting_vlan_get_type(),
90    }
91}
92
93impl SettingVlan {
94    /// Creates a new #NMSettingVlan object with default values.
95    ///
96    /// # Returns
97    ///
98    /// the new empty #NMSettingVlan object
99    #[doc(alias = "nm_setting_vlan_new")]
100    pub fn new() -> SettingVlan {
101        assert_initialized_main_thread!();
102        unsafe {
103            Setting::from_glib_full(ffi::nm_setting_vlan_new()).unsafe_cast()
104        }
105    }
106
107            // rustdoc-stripper-ignore-next
108            /// Creates a new builder-pattern struct instance to construct [`SettingVlan`] objects.
109            ///
110            /// This method returns an instance of [`SettingVlanBuilder`](crate::builders::SettingVlanBuilder) which can be used to create [`SettingVlan`] objects.
111            pub fn builder() -> SettingVlanBuilder {
112                SettingVlanBuilder::new()
113            }
114        
115
116    /// Adds a priority mapping to the #NMSettingVlan:ingress_priority_map or
117    /// #NMSettingVlan:egress_priority_map properties of the setting. If @from is
118    /// already in the given priority map, this function will overwrite the
119    /// existing entry with the new @to.
120    ///
121    /// If @map is #NM_VLAN_INGRESS_MAP then @from is the incoming 802.1q VLAN
122    /// Priority Code Point (PCP) value, and @to is the Linux SKB priority value.
123    ///
124    /// If @map is #NM_VLAN_EGRESS_MAP then @from is the Linux SKB priority value and
125    /// @to is the outgoing 802.1q VLAN Priority Code Point (PCP) value.
126    /// ## `map`
127    /// the type of priority map
128    /// ## `from`
129    /// the priority to map to @to
130    /// ## `to`
131    /// the priority to map @from to
132    ///
133    /// # Returns
134    ///
135    /// [`true`].
136    #[doc(alias = "nm_setting_vlan_add_priority")]
137    pub fn add_priority(&self, map: VlanPriorityMap, from: u32, to: u32) -> bool {
138        unsafe {
139            from_glib(ffi::nm_setting_vlan_add_priority(self.to_glib_none().0, map.into_glib(), from, to))
140        }
141    }
142
143    /// Adds a priority map entry into either the #NMSettingVlan:ingress_priority_map
144    /// or the #NMSettingVlan:egress_priority_map properties.  The priority map maps
145    /// the Linux SKB priorities to 802.1p priorities.
146    /// ## `map`
147    /// the type of priority map
148    /// ## `str`
149    /// the string which contains a priority map, like "3:7"
150    ///
151    /// # Returns
152    ///
153    /// [`true`] if the entry was successfully added to the list, or it
154    /// overwrote the old value, [`false`] if @str is not a valid mapping.
155    #[doc(alias = "nm_setting_vlan_add_priority_str")]
156    pub fn add_priority_str(&self, map: VlanPriorityMap, str: &str) -> bool {
157        unsafe {
158            from_glib(ffi::nm_setting_vlan_add_priority_str(self.to_glib_none().0, map.into_glib(), str.to_glib_none().0))
159        }
160    }
161
162    /// Clear all the entries from #NMSettingVlan:ingress_priority_map or
163    /// #NMSettingVlan:egress_priority_map properties.
164    /// ## `map`
165    /// the type of priority map
166    #[doc(alias = "nm_setting_vlan_clear_priorities")]
167    pub fn clear_priorities(&self, map: VlanPriorityMap) {
168        unsafe {
169            ffi::nm_setting_vlan_clear_priorities(self.to_glib_none().0, map.into_glib());
170        }
171    }
172
173    ///
174    /// # Returns
175    ///
176    /// the #NMSettingVlan:flags property of the setting
177    #[doc(alias = "nm_setting_vlan_get_flags")]
178    #[doc(alias = "get_flags")]
179    pub fn flags(&self) -> u32 {
180        unsafe {
181            ffi::nm_setting_vlan_get_flags(self.to_glib_none().0)
182        }
183    }
184
185    ///
186    /// # Returns
187    ///
188    /// the #NMSettingVlan:id property of the setting
189    #[doc(alias = "nm_setting_vlan_get_id")]
190    #[doc(alias = "get_id")]
191    pub fn id(&self) -> u32 {
192        unsafe {
193            ffi::nm_setting_vlan_get_id(self.to_glib_none().0)
194        }
195    }
196
197    /// Returns the number of entries in the
198    /// #NMSettingVlan:ingress_priority_map or #NMSettingVlan:egress_priority_map
199    /// properties of this setting.
200    /// ## `map`
201    /// the type of priority map
202    ///
203    /// # Returns
204    ///
205    /// return the number of ingress/egress priority entries.
206    #[doc(alias = "nm_setting_vlan_get_num_priorities")]
207    #[doc(alias = "get_num_priorities")]
208    pub fn num_priorities(&self, map: VlanPriorityMap) -> i32 {
209        unsafe {
210            ffi::nm_setting_vlan_get_num_priorities(self.to_glib_none().0, map.into_glib())
211        }
212    }
213
214    ///
215    /// # Returns
216    ///
217    /// the #NMSettingVlan:parent property of the setting
218    #[doc(alias = "nm_setting_vlan_get_parent")]
219    #[doc(alias = "get_parent")]
220    pub fn parent(&self) -> glib::GString {
221        unsafe {
222            from_glib_none(ffi::nm_setting_vlan_get_parent(self.to_glib_none().0))
223        }
224    }
225
226    /// Retrieve one of the entries of the #NMSettingVlan:ingress_priority_map
227    /// or #NMSettingVlan:egress_priority_map properties of this setting.
228    /// ## `map`
229    /// the type of priority map
230    /// ## `idx`
231    /// the zero-based index of the ingress/egress priority map entry
232    ///
233    /// # Returns
234    ///
235    /// returns [`true`] if @idx is in range. Otherwise, [`false`].
236    ///
237    /// ## `out_from`
238    /// on return the value of the priority map's 'from' item
239    ///
240    /// ## `out_to`
241    /// on return the value of priority map's 'to' item
242    #[doc(alias = "nm_setting_vlan_get_priority")]
243    #[doc(alias = "get_priority")]
244    pub fn priority(&self, map: VlanPriorityMap, idx: u32) -> Option<(u32, u32)> {
245        unsafe {
246            let mut out_from = std::mem::MaybeUninit::uninit();
247            let mut out_to = std::mem::MaybeUninit::uninit();
248            let ret = from_glib(ffi::nm_setting_vlan_get_priority(self.to_glib_none().0, map.into_glib(), idx, out_from.as_mut_ptr(), out_to.as_mut_ptr()));
249            if ret { Some((out_from.assume_init(), out_to.assume_init())) } else { None }
250        }
251    }
252
253    ///
254    /// # Returns
255    ///
256    /// the #NMSettingVlan:protocol property of the setting
257    #[cfg(feature = "v1_42")]
258    #[cfg_attr(docsrs, doc(cfg(feature = "v1_42")))]
259    #[doc(alias = "nm_setting_vlan_get_protocol")]
260    #[doc(alias = "get_protocol")]
261    pub fn protocol(&self) -> glib::GString {
262        unsafe {
263            from_glib_none(ffi::nm_setting_vlan_get_protocol(self.to_glib_none().0))
264        }
265    }
266
267    /// Removes the priority map at index @idx from the
268    /// #NMSettingVlan:ingress_priority_map or #NMSettingVlan:egress_priority_map
269    /// properties.
270    /// ## `map`
271    /// the type of priority map
272    /// ## `idx`
273    /// the zero-based index of the priority map to remove
274    #[doc(alias = "nm_setting_vlan_remove_priority")]
275    pub fn remove_priority(&self, map: VlanPriorityMap, idx: u32) {
276        unsafe {
277            ffi::nm_setting_vlan_remove_priority(self.to_glib_none().0, map.into_glib(), idx);
278        }
279    }
280
281    /// Removes the priority map @form:@to from the #NMSettingVlan:ingress_priority_map
282    /// or #NMSettingVlan:egress_priority_map (according to @map argument)
283    /// properties.
284    /// ## `map`
285    /// the type of priority map
286    /// ## `from`
287    /// the priority to map to @to
288    /// ## `to`
289    /// the priority to map @from to
290    ///
291    /// # Returns
292    ///
293    /// [`true`] if the priority mapping was found and removed; [`false`] if it was not.
294    #[doc(alias = "nm_setting_vlan_remove_priority_by_value")]
295    pub fn remove_priority_by_value(&self, map: VlanPriorityMap, from: u32, to: u32) -> bool {
296        unsafe {
297            from_glib(ffi::nm_setting_vlan_remove_priority_by_value(self.to_glib_none().0, map.into_glib(), from, to))
298        }
299    }
300
301    /// Removes the priority map @str from the #NMSettingVlan:ingress_priority_map
302    /// or #NMSettingVlan:egress_priority_map (according to @map argument)
303    /// properties.
304    /// ## `map`
305    /// the type of priority map
306    /// ## `str`
307    /// the string which contains a priority map, like "3:7"
308    ///
309    /// # Returns
310    ///
311    /// [`true`] if the priority mapping was found and removed; [`false`] if it was not.
312    #[doc(alias = "nm_setting_vlan_remove_priority_str_by_value")]
313    pub fn remove_priority_str_by_value(&self, map: VlanPriorityMap, str: &str) -> bool {
314        unsafe {
315            from_glib(ffi::nm_setting_vlan_remove_priority_str_by_value(self.to_glib_none().0, map.into_glib(), str.to_glib_none().0))
316        }
317    }
318
319    /// For outgoing packets, a list of mappings from Linux SKB priorities to
320    /// 802.1p priorities.  The mapping is given in the format "from:to" where
321    /// both "from" and "to" are unsigned integers, ie "7:3".
322    #[doc(alias = "egress-priority-map")]
323    pub fn egress_priority_map(&self) -> Vec<glib::GString> {
324        ObjectExt::property(self, "egress-priority-map")
325    }
326
327    /// For outgoing packets, a list of mappings from Linux SKB priorities to
328    /// 802.1p priorities.  The mapping is given in the format "from:to" where
329    /// both "from" and "to" are unsigned integers, ie "7:3".
330    #[doc(alias = "egress-priority-map")]
331    pub fn set_egress_priority_map(&self, egress_priority_map: &[&str]) {
332        ObjectExt::set_property(self,"egress-priority-map", egress_priority_map)
333    }
334
335    /// One or more flags which control the behavior and features of the VLAN
336    /// interface.  Flags include [`VlanFlags::REORDER_HEADERS`][crate::VlanFlags::REORDER_HEADERS] (reordering of
337    /// output packet headers), [`VlanFlags::GVRP`][crate::VlanFlags::GVRP] (use of the GVRP protocol),
338    /// and [`VlanFlags::LOOSE_BINDING`][crate::VlanFlags::LOOSE_BINDING] (loose binding of the interface to its
339    /// controller device's operating state). [`VlanFlags::MVRP`][crate::VlanFlags::MVRP] (use of the MVRP
340    /// protocol).
341    ///
342    /// The default value of this property is NM_VLAN_FLAG_REORDER_HEADERS,
343    /// but it used to be 0. To preserve backward compatibility, the default-value
344    /// in the D-Bus API continues to be 0 and a missing property on D-Bus
345    /// is still considered as 0.
346    pub fn set_flags(&self, flags: VlanFlags) {
347        ObjectExt::set_property(self,"flags", flags)
348    }
349
350    /// The VLAN identifier that the interface created by this connection should
351    /// be assigned. The valid range is from 0 to 4094, without the reserved id 4095.
352    pub fn set_id(&self, id: u32) {
353        ObjectExt::set_property(self,"id", id)
354    }
355
356    /// For incoming packets, a list of mappings from 802.1p priorities to Linux
357    /// SKB priorities.  The mapping is given in the format "from:to" where both
358    /// "from" and "to" are unsigned integers, ie "7:3".
359    #[doc(alias = "ingress-priority-map")]
360    pub fn ingress_priority_map(&self) -> Vec<glib::GString> {
361        ObjectExt::property(self, "ingress-priority-map")
362    }
363
364    /// For incoming packets, a list of mappings from 802.1p priorities to Linux
365    /// SKB priorities.  The mapping is given in the format "from:to" where both
366    /// "from" and "to" are unsigned integers, ie "7:3".
367    #[doc(alias = "ingress-priority-map")]
368    pub fn set_ingress_priority_map(&self, ingress_priority_map: &[&str]) {
369        ObjectExt::set_property(self,"ingress-priority-map", ingress_priority_map)
370    }
371
372    /// If given, specifies the parent interface name or parent connection UUID
373    /// from which this VLAN interface should be created.  If this property is
374    /// not specified, the connection must contain an #NMSettingWired setting
375    /// with a #NMSettingWired:mac-address property.
376    pub fn set_parent(&self, parent: Option<&str>) {
377        ObjectExt::set_property(self,"parent", parent)
378    }
379
380    /// Specifies the VLAN protocol to use for encapsulation.
381    ///
382    /// Supported values are: '802.1Q', '802.1ad'. If not specified the default
383    /// value is '802.1Q'.
384    #[cfg(feature = "v1_42")]
385    #[cfg_attr(docsrs, doc(cfg(feature = "v1_42")))]
386    pub fn set_protocol(&self, protocol: Option<&str>) {
387        ObjectExt::set_property(self,"protocol", protocol)
388    }
389
390    #[doc(alias = "egress-priority-map")]
391    pub fn connect_egress_priority_map_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
392        unsafe extern "C" fn notify_egress_priority_map_trampoline<F: Fn(&SettingVlan) + 'static>(this: *mut ffi::NMSettingVlan, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
393            let f: &F = &*(f as *const F);
394            f(&from_glib_borrow(this))
395        }
396        unsafe {
397            let f: Box_<F> = Box_::new(f);
398            connect_raw(self.as_ptr() as *mut _, c"notify::egress-priority-map".as_ptr() as *const _,
399                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_egress_priority_map_trampoline::<F> as *const ())), Box_::into_raw(f))
400        }
401    }
402
403    #[doc(alias = "flags")]
404    pub fn connect_flags_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
405        unsafe extern "C" fn notify_flags_trampoline<F: Fn(&SettingVlan) + 'static>(this: *mut ffi::NMSettingVlan, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
406            let f: &F = &*(f as *const F);
407            f(&from_glib_borrow(this))
408        }
409        unsafe {
410            let f: Box_<F> = Box_::new(f);
411            connect_raw(self.as_ptr() as *mut _, c"notify::flags".as_ptr() as *const _,
412                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_flags_trampoline::<F> as *const ())), Box_::into_raw(f))
413        }
414    }
415
416    #[doc(alias = "id")]
417    pub fn connect_id_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
418        unsafe extern "C" fn notify_id_trampoline<F: Fn(&SettingVlan) + 'static>(this: *mut ffi::NMSettingVlan, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
419            let f: &F = &*(f as *const F);
420            f(&from_glib_borrow(this))
421        }
422        unsafe {
423            let f: Box_<F> = Box_::new(f);
424            connect_raw(self.as_ptr() as *mut _, c"notify::id".as_ptr() as *const _,
425                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_id_trampoline::<F> as *const ())), Box_::into_raw(f))
426        }
427    }
428
429    #[doc(alias = "ingress-priority-map")]
430    pub fn connect_ingress_priority_map_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
431        unsafe extern "C" fn notify_ingress_priority_map_trampoline<F: Fn(&SettingVlan) + 'static>(this: *mut ffi::NMSettingVlan, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
432            let f: &F = &*(f as *const F);
433            f(&from_glib_borrow(this))
434        }
435        unsafe {
436            let f: Box_<F> = Box_::new(f);
437            connect_raw(self.as_ptr() as *mut _, c"notify::ingress-priority-map".as_ptr() as *const _,
438                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_ingress_priority_map_trampoline::<F> as *const ())), Box_::into_raw(f))
439        }
440    }
441
442    #[doc(alias = "parent")]
443    pub fn connect_parent_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
444        unsafe extern "C" fn notify_parent_trampoline<F: Fn(&SettingVlan) + 'static>(this: *mut ffi::NMSettingVlan, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
445            let f: &F = &*(f as *const F);
446            f(&from_glib_borrow(this))
447        }
448        unsafe {
449            let f: Box_<F> = Box_::new(f);
450            connect_raw(self.as_ptr() as *mut _, c"notify::parent".as_ptr() as *const _,
451                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_parent_trampoline::<F> as *const ())), Box_::into_raw(f))
452        }
453    }
454
455    #[cfg(feature = "v1_42")]
456    #[cfg_attr(docsrs, doc(cfg(feature = "v1_42")))]
457    #[doc(alias = "protocol")]
458    pub fn connect_protocol_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
459        unsafe extern "C" fn notify_protocol_trampoline<F: Fn(&SettingVlan) + 'static>(this: *mut ffi::NMSettingVlan, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
460            let f: &F = &*(f as *const F);
461            f(&from_glib_borrow(this))
462        }
463        unsafe {
464            let f: Box_<F> = Box_::new(f);
465            connect_raw(self.as_ptr() as *mut _, c"notify::protocol".as_ptr() as *const _,
466                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_protocol_trampoline::<F> as *const ())), Box_::into_raw(f))
467        }
468    }
469}
470
471impl Default for SettingVlan {
472                     fn default() -> Self {
473                         Self::new()
474                     }
475                 }
476
477// rustdoc-stripper-ignore-next
478        /// A [builder-pattern] type to construct [`SettingVlan`] objects.
479        ///
480        /// [builder-pattern]: https://doc.rust-lang.org/1.0.0/style/ownership/builders.html
481#[must_use = "The builder must be built to be used"]
482pub struct SettingVlanBuilder {
483            builder: glib::object::ObjectBuilder<'static, SettingVlan>,
484        }
485
486        impl SettingVlanBuilder {
487        fn new() -> Self {
488            Self { builder: glib::object::Object::builder() }
489        }
490
491                            /// For outgoing packets, a list of mappings from Linux SKB priorities to
492                            /// 802.1p priorities.  The mapping is given in the format "from:to" where
493                            /// both "from" and "to" are unsigned integers, ie "7:3".
494                            pub fn egress_priority_map(self, egress_priority_map: impl Into<glib::StrV>) -> Self {
495                            Self { builder: self.builder.property("egress-priority-map", egress_priority_map.into()), }
496                        }
497
498                            /// One or more flags which control the behavior and features of the VLAN
499                            /// interface.  Flags include [`VlanFlags::REORDER_HEADERS`][crate::VlanFlags::REORDER_HEADERS] (reordering of
500                            /// output packet headers), [`VlanFlags::GVRP`][crate::VlanFlags::GVRP] (use of the GVRP protocol),
501                            /// and [`VlanFlags::LOOSE_BINDING`][crate::VlanFlags::LOOSE_BINDING] (loose binding of the interface to its
502                            /// controller device's operating state). [`VlanFlags::MVRP`][crate::VlanFlags::MVRP] (use of the MVRP
503                            /// protocol).
504                            ///
505                            /// The default value of this property is NM_VLAN_FLAG_REORDER_HEADERS,
506                            /// but it used to be 0. To preserve backward compatibility, the default-value
507                            /// in the D-Bus API continues to be 0 and a missing property on D-Bus
508                            /// is still considered as 0.
509                            pub fn flags(self, flags: VlanFlags) -> Self {
510                            Self { builder: self.builder.property("flags", flags), }
511                        }
512
513                            /// The VLAN identifier that the interface created by this connection should
514                            /// be assigned. The valid range is from 0 to 4094, without the reserved id 4095.
515                            pub fn id(self, id: u32) -> Self {
516                            Self { builder: self.builder.property("id", id), }
517                        }
518
519                            /// For incoming packets, a list of mappings from 802.1p priorities to Linux
520                            /// SKB priorities.  The mapping is given in the format "from:to" where both
521                            /// "from" and "to" are unsigned integers, ie "7:3".
522                            pub fn ingress_priority_map(self, ingress_priority_map: impl Into<glib::StrV>) -> Self {
523                            Self { builder: self.builder.property("ingress-priority-map", ingress_priority_map.into()), }
524                        }
525
526                            /// If given, specifies the parent interface name or parent connection UUID
527                            /// from which this VLAN interface should be created.  If this property is
528                            /// not specified, the connection must contain an #NMSettingWired setting
529                            /// with a #NMSettingWired:mac-address property.
530                            pub fn parent(self, parent: impl Into<glib::GString>) -> Self {
531                            Self { builder: self.builder.property("parent", parent.into()), }
532                        }
533
534                            /// Specifies the VLAN protocol to use for encapsulation.
535                            ///
536                            /// Supported values are: '802.1Q', '802.1ad'. If not specified the default
537                            /// value is '802.1Q'.
538                            #[cfg(feature = "v1_42")]
539    #[cfg_attr(docsrs, doc(cfg(feature = "v1_42")))]
540    pub fn protocol(self, protocol: impl Into<glib::GString>) -> Self {
541                            Self { builder: self.builder.property("protocol", protocol.into()), }
542                        }
543
544    // rustdoc-stripper-ignore-next
545    /// Build the [`SettingVlan`].
546    #[must_use = "Building the object from the builder is usually expensive and is not expected to have side effects"]
547    pub fn build(self) -> SettingVlan {
548assert_initialized_main_thread!();
549    self.builder.build() }
550}