Class: MistApi::StatsWxrule
- Defined in:
- lib/mist_api/models/stats_wxrule.rb
Overview
Wxrule statistics
Instance Attribute Summary collapse
-
#action ⇒ StatsWxruleActionEnum
enum: ‘allow`, `block`.
-
#client_mac ⇒ Array[String]
enum: ‘allow`, `block`.
-
#dst_allow_wxtags ⇒ Array[UUID | String]
enum: ‘allow`, `block`.
-
#dst_deny_wxtags ⇒ Array[UUID | String]
enum: ‘allow`, `block`.
-
#dst_wxtags ⇒ Array[UUID | String]
enum: ‘allow`, `block`.
-
#name ⇒ String
enum: ‘allow`, `block`.
-
#order ⇒ Integer
enum: ‘allow`, `block`.
-
#src_wxtags ⇒ Array[UUID | String]
enum: ‘allow`, `block`.
-
#usage ⇒ Hash[String, StatsWxruleUsageProperties]
enum: ‘allow`, `block`.
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.
Instance Method Summary collapse
-
#initialize(action = nil, client_mac = nil, dst_allow_wxtags = nil, dst_deny_wxtags = nil, dst_wxtags = nil, name = nil, order = nil, src_wxtags = nil, usage = nil) ⇒ StatsWxrule
constructor
A new instance of StatsWxrule.
-
#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(action = nil, client_mac = nil, dst_allow_wxtags = nil, dst_deny_wxtags = nil, dst_wxtags = nil, name = nil, order = nil, src_wxtags = nil, usage = nil) ⇒ StatsWxrule
Returns a new instance of StatsWxrule.
73 74 75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/mist_api/models/stats_wxrule.rb', line 73 def initialize(action = nil, client_mac = nil, = nil, = nil, = nil, name = nil, order = nil, = nil, usage = nil) @action = action @client_mac = client_mac @dst_allow_wxtags = @dst_deny_wxtags = @dst_wxtags = @name = name @order = order @src_wxtags = @usage = usage end |
Instance Attribute Details
#action ⇒ StatsWxruleActionEnum
enum: ‘allow`, `block`
14 15 16 |
# File 'lib/mist_api/models/stats_wxrule.rb', line 14 def action @action end |
#client_mac ⇒ Array[String]
enum: ‘allow`, `block`
18 19 20 |
# File 'lib/mist_api/models/stats_wxrule.rb', line 18 def client_mac @client_mac end |
#dst_allow_wxtags ⇒ Array[UUID | String]
enum: ‘allow`, `block`
22 23 24 |
# File 'lib/mist_api/models/stats_wxrule.rb', line 22 def @dst_allow_wxtags end |
#dst_deny_wxtags ⇒ Array[UUID | String]
enum: ‘allow`, `block`
26 27 28 |
# File 'lib/mist_api/models/stats_wxrule.rb', line 26 def @dst_deny_wxtags end |
#dst_wxtags ⇒ Array[UUID | String]
enum: ‘allow`, `block`
30 31 32 |
# File 'lib/mist_api/models/stats_wxrule.rb', line 30 def @dst_wxtags end |
#name ⇒ String
enum: ‘allow`, `block`
34 35 36 |
# File 'lib/mist_api/models/stats_wxrule.rb', line 34 def name @name end |
#order ⇒ Integer
enum: ‘allow`, `block`
38 39 40 |
# File 'lib/mist_api/models/stats_wxrule.rb', line 38 def order @order end |
#src_wxtags ⇒ Array[UUID | String]
enum: ‘allow`, `block`
42 43 44 |
# File 'lib/mist_api/models/stats_wxrule.rb', line 42 def @src_wxtags end |
#usage ⇒ Hash[String, StatsWxruleUsageProperties]
enum: ‘allow`, `block`
46 47 48 |
# File 'lib/mist_api/models/stats_wxrule.rb', line 46 def usage @usage end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 |
# File 'lib/mist_api/models/stats_wxrule.rb', line 88 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. action = hash.key?('action') ? hash['action'] : nil client_mac = hash.key?('client_mac') ? hash['client_mac'] : nil = hash.key?('dst_allow_wxtags') ? hash['dst_allow_wxtags'] : nil = hash.key?('dst_deny_wxtags') ? hash['dst_deny_wxtags'] : nil = hash.key?('dst_wxtags') ? hash['dst_wxtags'] : nil name = hash.key?('name') ? hash['name'] : nil order = hash.key?('order') ? hash['order'] : nil = hash.key?('src_wxtags') ? hash['src_wxtags'] : nil usage = StatsWxruleUsageProperties.from_hash(hash['usage']) if hash['usage'] usage = nil unless hash.key?('usage') # Create object from extracted values. StatsWxrule.new(action, client_mac, , , , name, order, , usage) end |
.names ⇒ Object
A mapping from model property names to API property names.
49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/mist_api/models/stats_wxrule.rb', line 49 def self.names @_hash = {} if @_hash.nil? @_hash['action'] = 'action' @_hash['client_mac'] = 'client_mac' @_hash['dst_allow_wxtags'] = 'dst_allow_wxtags' @_hash['dst_deny_wxtags'] = 'dst_deny_wxtags' @_hash['dst_wxtags'] = 'dst_wxtags' @_hash['name'] = 'name' @_hash['order'] = 'order' @_hash['src_wxtags'] = 'src_wxtags' @_hash['usage'] = 'usage' @_hash end |
.nullables ⇒ Object
An array for nullable fields
69 70 71 |
# File 'lib/mist_api/models/stats_wxrule.rb', line 69 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
64 65 66 |
# File 'lib/mist_api/models/stats_wxrule.rb', line 64 def self.optionals [] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
127 128 129 130 131 132 133 |
# File 'lib/mist_api/models/stats_wxrule.rb', line 127 def inspect class_name = self.class.name.split('::').last "<#{class_name} action: #{@action.inspect}, client_mac: #{@client_mac.inspect},"\ " dst_allow_wxtags: #{@dst_allow_wxtags.inspect}, dst_deny_wxtags:"\ " #{@dst_deny_wxtags.inspect}, dst_wxtags: #{@dst_wxtags.inspect}, name: #{@name.inspect},"\ " order: #{@order.inspect}, src_wxtags: #{@src_wxtags.inspect}, usage: #{@usage.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
119 120 121 122 123 124 |
# File 'lib/mist_api/models/stats_wxrule.rb', line 119 def to_s class_name = self.class.name.split('::').last "<#{class_name} action: #{@action}, client_mac: #{@client_mac}, dst_allow_wxtags:"\ " #{@dst_allow_wxtags}, dst_deny_wxtags: #{@dst_deny_wxtags}, dst_wxtags: #{@dst_wxtags},"\ " name: #{@name}, order: #{@order}, src_wxtags: #{@src_wxtags}, usage: #{@usage}>" end |