Class: CypressTestApi::NacTag
- Defined in:
- lib/cypress_test_api/models/nac_tag.rb
Overview
NacTag Model.
Instance Attribute Summary collapse
-
#allow_usermac_override ⇒ TrueClass | FalseClass
can be set to true to allow the override by usermac result.
-
#created_time ⇒ Float
can be set to true to allow the override by usermac result.
-
#egress_vlan_names ⇒ Array[String]
if ‘type`==`egress_vlan_names`, list of egress vlans to return.
-
#gbp_tag ⇒ Integer
if ‘type`==`gbp_tag`.
-
#id ⇒ UUID | String
if ‘type`==`gbp_tag`.
-
#match ⇒ NacTag
if ‘type`==`gbp_tag`.
-
#match_all ⇒ TrueClass | FalseClass
This field is applicable only when ‘type`==`match` * `false`: means it is sufficient to match any of the values (i.e., match-any behavior) * `true`: means all values should be matched (i.e., match-all behavior) Currently it makes sense to set this field to `true` only if the `match`==`idp_role` or `match`==`usermac_label`’.
-
#modified_time ⇒ Float
This field is applicable only when ‘type`==`match` * `false`: means it is sufficient to match any of the values (i.e., match-any behavior) * `true`: means all values should be matched (i.e., match-all behavior) Currently it makes sense to set this field to `true` only if the `match`==`idp_role` or `match`==`usermac_label`’.
-
#name ⇒ String
This field is applicable only when ‘type`==`match` * `false`: means it is sufficient to match any of the values (i.e., match-any behavior) * `true`: means all values should be matched (i.e., match-all behavior) Currently it makes sense to set this field to `true` only if the `match`==`idp_role` or `match`==`usermac_label`’.
-
#org_id ⇒ UUID | String
This field is applicable only when ‘type`==`match` * `false`: means it is sufficient to match any of the values (i.e., match-any behavior) * `true`: means all values should be matched (i.e., match-all behavior) Currently it makes sense to set this field to `true` only if the `match`==`idp_role` or `match`==`usermac_label`’.
-
#radius_attrs ⇒ Array[String]
if ‘type`==`radius_attrs`, user can specify a list of one or more standard attributes in the field “radius_attrs”.
-
#radius_group ⇒ String
if ‘type`==`radius_group`.
-
#radius_vendor_attrs ⇒ Array[String]
if ‘type`==`radius_vendor_attrs`, user can specify a list of one or more vendor-specific attributes in the field “radius_vendor_attrs”.
-
#session_timeout ⇒ Integer
if ‘type`==`session_timeout, in seconds.
-
#type ⇒ NacTag
if ‘type`==`session_timeout, in seconds.
-
#username_attr ⇒ NacTag
if ‘type`==`session_timeout, in seconds.
-
#values ⇒ Array[String]
if ‘type`==`match`.
-
#vlan ⇒ String
if ‘type`==`vlan`.
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(name = nil, type = nil, allow_usermac_override = false, created_time = SKIP, egress_vlan_names = SKIP, gbp_tag = SKIP, id = SKIP, match = SKIP, match_all = false, modified_time = SKIP, org_id = SKIP, radius_attrs = SKIP, radius_group = SKIP, radius_vendor_attrs = SKIP, session_timeout = SKIP, username_attr = SKIP, values = SKIP, vlan = SKIP) ⇒ NacTag
constructor
A new instance of NacTag.
-
#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(name = nil, type = nil, allow_usermac_override = false, created_time = SKIP, egress_vlan_names = SKIP, gbp_tag = SKIP, id = SKIP, match = SKIP, match_all = false, modified_time = SKIP, org_id = SKIP, radius_attrs = SKIP, radius_group = SKIP, radius_vendor_attrs = SKIP, session_timeout = SKIP, username_attr = SKIP, values = SKIP, vlan = SKIP) ⇒ NacTag
Returns a new instance of NacTag.
165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 |
# File 'lib/cypress_test_api/models/nac_tag.rb', line 165 def initialize(name = nil, type = nil, allow_usermac_override = false, created_time = SKIP, egress_vlan_names = SKIP, gbp_tag = SKIP, id = SKIP, match = SKIP, match_all = false, modified_time = SKIP, org_id = SKIP, radius_attrs = SKIP, radius_group = SKIP, radius_vendor_attrs = SKIP, session_timeout = SKIP, username_attr = SKIP, values = SKIP, vlan = SKIP) @allow_usermac_override = allow_usermac_override unless allow_usermac_override == SKIP @created_time = created_time unless created_time == SKIP @egress_vlan_names = egress_vlan_names unless egress_vlan_names == SKIP @gbp_tag = gbp_tag unless gbp_tag == SKIP @id = id unless id == SKIP @match = match unless match == SKIP @match_all = match_all unless match_all == SKIP @modified_time = modified_time unless modified_time == SKIP @name = name @org_id = org_id unless org_id == SKIP @radius_attrs = radius_attrs unless radius_attrs == SKIP @radius_group = radius_group unless radius_group == SKIP @radius_vendor_attrs = radius_vendor_attrs unless radius_vendor_attrs == SKIP @session_timeout = session_timeout unless session_timeout == SKIP @type = type @username_attr = username_attr unless username_attr == SKIP @values = values unless values == SKIP @vlan = vlan unless vlan == SKIP end |
Instance Attribute Details
#allow_usermac_override ⇒ TrueClass | FalseClass
can be set to true to allow the override by usermac result
14 15 16 |
# File 'lib/cypress_test_api/models/nac_tag.rb', line 14 def allow_usermac_override @allow_usermac_override end |
#created_time ⇒ Float
can be set to true to allow the override by usermac result
18 19 20 |
# File 'lib/cypress_test_api/models/nac_tag.rb', line 18 def created_time @created_time end |
#egress_vlan_names ⇒ Array[String]
if ‘type`==`egress_vlan_names`, list of egress vlans to return
22 23 24 |
# File 'lib/cypress_test_api/models/nac_tag.rb', line 22 def egress_vlan_names @egress_vlan_names end |
#gbp_tag ⇒ Integer
if ‘type`==`gbp_tag`
26 27 28 |
# File 'lib/cypress_test_api/models/nac_tag.rb', line 26 def gbp_tag @gbp_tag end |
#id ⇒ UUID | String
if ‘type`==`gbp_tag`
30 31 32 |
# File 'lib/cypress_test_api/models/nac_tag.rb', line 30 def id @id end |
#match ⇒ NacTag
if ‘type`==`gbp_tag`
34 35 36 |
# File 'lib/cypress_test_api/models/nac_tag.rb', line 34 def match @match end |
#match_all ⇒ TrueClass | FalseClass
This field is applicable only when ‘type`==`match`
* `false`: means it is sufficient to match any of the values (i.e.,
match-any behavior)
* `true`: means all values should be matched (i.e., match-all behavior)
Currently it makes sense to set this field to ‘true` only if the `match`==`idp_role` or `match`==`usermac_label`’
43 44 45 |
# File 'lib/cypress_test_api/models/nac_tag.rb', line 43 def match_all @match_all end |
#modified_time ⇒ Float
This field is applicable only when ‘type`==`match`
* `false`: means it is sufficient to match any of the values (i.e.,
match-any behavior)
* `true`: means all values should be matched (i.e., match-all behavior)
Currently it makes sense to set this field to ‘true` only if the `match`==`idp_role` or `match`==`usermac_label`’
52 53 54 |
# File 'lib/cypress_test_api/models/nac_tag.rb', line 52 def modified_time @modified_time end |
#name ⇒ String
This field is applicable only when ‘type`==`match`
* `false`: means it is sufficient to match any of the values (i.e.,
match-any behavior)
* `true`: means all values should be matched (i.e., match-all behavior)
Currently it makes sense to set this field to ‘true` only if the `match`==`idp_role` or `match`==`usermac_label`’
61 62 63 |
# File 'lib/cypress_test_api/models/nac_tag.rb', line 61 def name @name end |
#org_id ⇒ UUID | String
This field is applicable only when ‘type`==`match`
* `false`: means it is sufficient to match any of the values (i.e.,
match-any behavior)
* `true`: means all values should be matched (i.e., match-all behavior)
Currently it makes sense to set this field to ‘true` only if the `match`==`idp_role` or `match`==`usermac_label`’
70 71 72 |
# File 'lib/cypress_test_api/models/nac_tag.rb', line 70 def org_id @org_id end |
#radius_attrs ⇒ Array[String]
if ‘type`==`radius_attrs`, user can specify a list of one or more standard attributes in the field “radius_attrs”. It is the responsibility of the user to provide a syntactically correct string, otherwise it may not work as expected. Note that it is allowed to have more than one radius_attrs in the result of a given rule.
79 80 81 |
# File 'lib/cypress_test_api/models/nac_tag.rb', line 79 def radius_attrs @radius_attrs end |
#radius_group ⇒ String
if ‘type`==`radius_group`
83 84 85 |
# File 'lib/cypress_test_api/models/nac_tag.rb', line 83 def radius_group @radius_group end |
#radius_vendor_attrs ⇒ Array[String]
if ‘type`==`radius_vendor_attrs`, user can specify a list of one or more vendor-specific attributes in the field “radius_vendor_attrs”. It is the responsibility of the user to provide a syntactically correct string, otherwise it may not work as expected. Note that it is allowed to have more than one radius_vendor_attrs in the result of a given rule.
92 93 94 |
# File 'lib/cypress_test_api/models/nac_tag.rb', line 92 def radius_vendor_attrs @radius_vendor_attrs end |
#session_timeout ⇒ Integer
if ‘type`==`session_timeout, in seconds
96 97 98 |
# File 'lib/cypress_test_api/models/nac_tag.rb', line 96 def session_timeout @session_timeout end |
#type ⇒ NacTag
if ‘type`==`session_timeout, in seconds
100 101 102 |
# File 'lib/cypress_test_api/models/nac_tag.rb', line 100 def type @type end |
#username_attr ⇒ NacTag
if ‘type`==`session_timeout, in seconds
104 105 106 |
# File 'lib/cypress_test_api/models/nac_tag.rb', line 104 def username_attr @username_attr end |
#values ⇒ Array[String]
if ‘type`==`match`
108 109 110 |
# File 'lib/cypress_test_api/models/nac_tag.rb', line 108 def values @values end |
#vlan ⇒ String
if ‘type`==`vlan`
112 113 114 |
# File 'lib/cypress_test_api/models/nac_tag.rb', line 112 def vlan @vlan end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 |
# File 'lib/cypress_test_api/models/nac_tag.rb', line 193 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. name = hash.key?('name') ? hash['name'] : nil type = NacTag.from_hash(hash['type']) if hash['type'] allow_usermac_override = hash['allow_usermac_override'] ||= false created_time = hash.key?('created_time') ? hash['created_time'] : SKIP egress_vlan_names = hash.key?('egress_vlan_names') ? hash['egress_vlan_names'] : SKIP gbp_tag = hash.key?('gbp_tag') ? hash['gbp_tag'] : SKIP id = hash.key?('id') ? hash['id'] : SKIP match = NacTag.from_hash(hash['match']) if hash['match'] match_all = hash['match_all'] ||= false modified_time = hash.key?('modified_time') ? hash['modified_time'] : SKIP org_id = hash.key?('org_id') ? hash['org_id'] : SKIP radius_attrs = hash.key?('radius_attrs') ? hash['radius_attrs'] : SKIP radius_group = hash.key?('radius_group') ? hash['radius_group'] : SKIP radius_vendor_attrs = hash.key?('radius_vendor_attrs') ? hash['radius_vendor_attrs'] : SKIP session_timeout = hash.key?('session_timeout') ? hash['session_timeout'] : SKIP username_attr = NacTag.from_hash(hash['username_attr']) if hash['username_attr'] values = hash.key?('values') ? hash['values'] : SKIP vlan = hash.key?('vlan') ? hash['vlan'] : SKIP # Create object from extracted values. NacTag.new(name, type, allow_usermac_override, created_time, egress_vlan_names, gbp_tag, id, match, match_all, modified_time, org_id, radius_attrs, radius_group, radius_vendor_attrs, session_timeout, username_attr, values, vlan) end |
.names ⇒ Object
A mapping from model property names to API property names.
115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 |
# File 'lib/cypress_test_api/models/nac_tag.rb', line 115 def self.names @_hash = {} if @_hash.nil? @_hash['allow_usermac_override'] = 'allow_usermac_override' @_hash['created_time'] = 'created_time' @_hash['egress_vlan_names'] = 'egress_vlan_names' @_hash['gbp_tag'] = 'gbp_tag' @_hash['id'] = 'id' @_hash['match'] = 'match' @_hash['match_all'] = 'match_all' @_hash['modified_time'] = 'modified_time' @_hash['name'] = 'name' @_hash['org_id'] = 'org_id' @_hash['radius_attrs'] = 'radius_attrs' @_hash['radius_group'] = 'radius_group' @_hash['radius_vendor_attrs'] = 'radius_vendor_attrs' @_hash['session_timeout'] = 'session_timeout' @_hash['type'] = 'type' @_hash['username_attr'] = 'username_attr' @_hash['values'] = 'values' @_hash['vlan'] = 'vlan' @_hash end |
.nullables ⇒ Object
An array for nullable fields
161 162 163 |
# File 'lib/cypress_test_api/models/nac_tag.rb', line 161 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 |
# File 'lib/cypress_test_api/models/nac_tag.rb', line 139 def self.optionals %w[ allow_usermac_override created_time egress_vlan_names gbp_tag id match match_all modified_time org_id radius_attrs radius_group radius_vendor_attrs session_timeout username_attr values vlan ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
253 254 255 256 257 258 259 260 261 262 263 |
# File 'lib/cypress_test_api/models/nac_tag.rb', line 253 def inspect class_name = self.class.name.split('::').last "<#{class_name} allow_usermac_override: #{@allow_usermac_override.inspect}, created_time:"\ " #{@created_time.inspect}, egress_vlan_names: #{@egress_vlan_names.inspect}, gbp_tag:"\ " #{@gbp_tag.inspect}, id: #{@id.inspect}, match: #{@match.inspect}, match_all:"\ " #{@match_all.inspect}, modified_time: #{@modified_time.inspect}, name: #{@name.inspect},"\ " org_id: #{@org_id.inspect}, radius_attrs: #{@radius_attrs.inspect}, radius_group:"\ " #{@radius_group.inspect}, radius_vendor_attrs: #{@radius_vendor_attrs.inspect},"\ " session_timeout: #{@session_timeout.inspect}, type: #{@type.inspect}, username_attr:"\ " #{@username_attr.inspect}, values: #{@values.inspect}, vlan: #{@vlan.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
241 242 243 244 245 246 247 248 249 250 |
# File 'lib/cypress_test_api/models/nac_tag.rb', line 241 def to_s class_name = self.class.name.split('::').last "<#{class_name} allow_usermac_override: #{@allow_usermac_override}, created_time:"\ " #{@created_time}, egress_vlan_names: #{@egress_vlan_names}, gbp_tag: #{@gbp_tag}, id:"\ " #{@id}, match: #{@match}, match_all: #{@match_all}, modified_time: #{@modified_time},"\ " name: #{@name}, org_id: #{@org_id}, radius_attrs: #{@radius_attrs}, radius_group:"\ " #{@radius_group}, radius_vendor_attrs: #{@radius_vendor_attrs}, session_timeout:"\ " #{@session_timeout}, type: #{@type}, username_attr: #{@username_attr}, values: #{@values},"\ " vlan: #{@vlan}>" end |