Class: MistApi::WlanBonjourServiceProperties
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- MistApi::WlanBonjourServiceProperties
- Defined in:
- lib/mist_api/models/wlan_bonjour_service_properties.rb
Overview
WlanBonjourServiceProperties Model.
Instance Attribute Summary collapse
-
#disable_local ⇒ TrueClass | FalseClass
Whether to prevent wireless clients to discover bonjour devices on the same WLAN.
-
#radius_groups ⇒ Array[String]
Optional, if the service is further restricted for certain RADIUS groups.
-
#scope ⇒ WlanBonjourServicePropertiesScopeEnum
how bonjour services should be discovered for the same WLAN.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
-
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
Instance Method Summary collapse
-
#initialize(disable_local = false, radius_groups = SKIP, scope = WlanBonjourServicePropertiesScopeEnum::SAME_SITE) ⇒ WlanBonjourServiceProperties
constructor
A new instance of WlanBonjourServiceProperties.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(disable_local = false, radius_groups = SKIP, scope = WlanBonjourServicePropertiesScopeEnum::SAME_SITE) ⇒ WlanBonjourServiceProperties
Returns a new instance of WlanBonjourServiceProperties.
49 50 51 52 53 54 |
# File 'lib/mist_api/models/wlan_bonjour_service_properties.rb', line 49 def initialize(disable_local = false, radius_groups = SKIP, scope = WlanBonjourServicePropertiesScopeEnum::SAME_SITE) @disable_local = disable_local unless disable_local == SKIP @radius_groups = radius_groups unless radius_groups == SKIP @scope = scope unless scope == SKIP end |
Instance Attribute Details
#disable_local ⇒ TrueClass | FalseClass
Whether to prevent wireless clients to discover bonjour devices on the same WLAN
15 16 17 |
# File 'lib/mist_api/models/wlan_bonjour_service_properties.rb', line 15 def disable_local @disable_local end |
#radius_groups ⇒ Array[String]
Optional, if the service is further restricted for certain RADIUS groups
19 20 21 |
# File 'lib/mist_api/models/wlan_bonjour_service_properties.rb', line 19 def radius_groups @radius_groups end |
#scope ⇒ WlanBonjourServicePropertiesScopeEnum
how bonjour services should be discovered for the same WLAN. enum: ‘same_ap`, `same_map`, `same_site`
24 25 26 |
# File 'lib/mist_api/models/wlan_bonjour_service_properties.rb', line 24 def scope @scope end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
57 58 59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/mist_api/models/wlan_bonjour_service_properties.rb', line 57 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. disable_local = hash['disable_local'] ||= false radius_groups = hash.key?('radius_groups') ? hash['radius_groups'] : SKIP scope = hash['scope'] ||= WlanBonjourServicePropertiesScopeEnum::SAME_SITE # Create object from extracted values. WlanBonjourServiceProperties.new(disable_local, radius_groups, scope) end |
.names ⇒ Object
A mapping from model property names to API property names.
27 28 29 30 31 32 33 |
# File 'lib/mist_api/models/wlan_bonjour_service_properties.rb', line 27 def self.names @_hash = {} if @_hash.nil? @_hash['disable_local'] = 'disable_local' @_hash['radius_groups'] = 'radius_groups' @_hash['scope'] = 'scope' @_hash end |
.nullables ⇒ Object
An array for nullable fields
45 46 47 |
# File 'lib/mist_api/models/wlan_bonjour_service_properties.rb', line 45 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
36 37 38 39 40 41 42 |
# File 'lib/mist_api/models/wlan_bonjour_service_properties.rb', line 36 def self.optionals %w[ disable_local radius_groups scope ] end |
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
73 74 75 76 77 78 79 |
# File 'lib/mist_api/models/wlan_bonjour_service_properties.rb', line 73 def self.validate(value) return true if value.instance_of? self return false unless value.instance_of? Hash true end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
89 90 91 92 93 |
# File 'lib/mist_api/models/wlan_bonjour_service_properties.rb', line 89 def inspect class_name = self.class.name.split('::').last "<#{class_name} disable_local: #{@disable_local.inspect}, radius_groups:"\ " #{@radius_groups.inspect}, scope: #{@scope.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
82 83 84 85 86 |
# File 'lib/mist_api/models/wlan_bonjour_service_properties.rb', line 82 def to_s class_name = self.class.name.split('::').last "<#{class_name} disable_local: #{@disable_local}, radius_groups: #{@radius_groups}, scope:"\ " #{@scope}>" end |