Class: MistApi::IdpProfileOverwrite
- Defined in:
- lib/mist_api/models/idp_profile_overwrite.rb
Overview
IdpProfileOverwrite Model.
Instance Attribute Summary collapse
-
#action ⇒ IdpProfileActionEnum
enum: * alert (default) * drop: silently dropping packets * close: notify client/server to close connection.
-
#matching ⇒ IdpProfileMatching
enum: * alert (default) * drop: silently dropping packets * close: notify client/server to close connection.
-
#name ⇒ String
enum: * alert (default) * drop: silently dropping packets * close: notify client/server to close connection.
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 = IdpProfileActionEnum::ALERT, matching = SKIP, name = SKIP) ⇒ IdpProfileOverwrite
constructor
A new instance of IdpProfileOverwrite.
-
#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 = IdpProfileActionEnum::ALERT, matching = SKIP, name = SKIP) ⇒ IdpProfileOverwrite
Returns a new instance of IdpProfileOverwrite.
56 57 58 59 60 61 |
# File 'lib/mist_api/models/idp_profile_overwrite.rb', line 56 def initialize(action = IdpProfileActionEnum::ALERT, matching = SKIP, name = SKIP) @action = action unless action == SKIP @matching = matching unless matching == SKIP @name = name unless name == SKIP end |
Instance Attribute Details
#action ⇒ IdpProfileActionEnum
enum:
* alert (default)
* drop: silently dropping packets
* close: notify client/server to close connection
17 18 19 |
# File 'lib/mist_api/models/idp_profile_overwrite.rb', line 17 def action @action end |
#matching ⇒ IdpProfileMatching
enum:
* alert (default)
* drop: silently dropping packets
* close: notify client/server to close connection
24 25 26 |
# File 'lib/mist_api/models/idp_profile_overwrite.rb', line 24 def matching @matching end |
#name ⇒ String
enum:
* alert (default)
* drop: silently dropping packets
* close: notify client/server to close connection
31 32 33 |
# File 'lib/mist_api/models/idp_profile_overwrite.rb', line 31 def name @name end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/mist_api/models/idp_profile_overwrite.rb', line 64 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. action = hash['action'] ||= IdpProfileActionEnum::ALERT matching = IdpProfileMatching.from_hash(hash['matching']) if hash['matching'] name = hash.key?('name') ? hash['name'] : SKIP # Create object from extracted values. IdpProfileOverwrite.new(action, matching, name) end |
.names ⇒ Object
A mapping from model property names to API property names.
34 35 36 37 38 39 40 |
# File 'lib/mist_api/models/idp_profile_overwrite.rb', line 34 def self.names @_hash = {} if @_hash.nil? @_hash['action'] = 'action' @_hash['matching'] = 'matching' @_hash['name'] = 'name' @_hash end |
.nullables ⇒ Object
An array for nullable fields
52 53 54 |
# File 'lib/mist_api/models/idp_profile_overwrite.rb', line 52 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
43 44 45 46 47 48 49 |
# File 'lib/mist_api/models/idp_profile_overwrite.rb', line 43 def self.optionals %w[ action matching name ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
85 86 87 88 89 |
# File 'lib/mist_api/models/idp_profile_overwrite.rb', line 85 def inspect class_name = self.class.name.split('::').last "<#{class_name} action: #{@action.inspect}, matching: #{@matching.inspect}, name:"\ " #{@name.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
79 80 81 82 |
# File 'lib/mist_api/models/idp_profile_overwrite.rb', line 79 def to_s class_name = self.class.name.split('::').last "<#{class_name} action: #{@action}, matching: #{@matching}, name: #{@name}>" end |