Class: MistApi::OrgSettingMistNacIdp

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/mist_api/models/org_setting_mist_nac_idp.rb

Overview

OrgSettingMistNacIdp Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json

Constructor Details

#initialize(exclude_realms = SKIP, id = SKIP, user_realms = SKIP) ⇒ OrgSettingMistNacIdp

Returns a new instance of OrgSettingMistNacIdp.



50
51
52
53
54
# File 'lib/mist_api/models/org_setting_mist_nac_idp.rb', line 50

def initialize(exclude_realms = SKIP, id = SKIP, user_realms = SKIP)
  @exclude_realms = exclude_realms unless exclude_realms == SKIP
  @id = id unless id == SKIP
  @user_realms = user_realms unless user_realms == SKIP
end

Instance Attribute Details

#exclude_realmsArray[String]

When the IDP of mxedge_proxy type, exclude the following realms from proxying in addition to other valid home realms in this org

Returns:

  • (Array[String])


15
16
17
# File 'lib/mist_api/models/org_setting_mist_nac_idp.rb', line 15

def exclude_realms
  @exclude_realms
end

#idUUID | String

Unique ID of the object instance in the Mist Organization

Returns:

  • (UUID | String)


19
20
21
# File 'lib/mist_api/models/org_setting_mist_nac_idp.rb', line 19

def id
  @id
end

#user_realmsArray[String]

Which realm should trigger this IDP. User Realm is extracted from:

* Username-AVP (`mist.com` from john@mist.com)
* Cert CN

Returns:

  • (Array[String])


25
26
27
# File 'lib/mist_api/models/org_setting_mist_nac_idp.rb', line 25

def user_realms
  @user_realms
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
70
# File 'lib/mist_api/models/org_setting_mist_nac_idp.rb', line 57

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  exclude_realms =
    hash.key?('exclude_realms') ? hash['exclude_realms'] : SKIP
  id = hash.key?('id') ? hash['id'] : SKIP
  user_realms = hash.key?('user_realms') ? hash['user_realms'] : SKIP

  # Create object from extracted values.
  OrgSettingMistNacIdp.new(exclude_realms,
                           id,
                           user_realms)
end

.namesObject

A mapping from model property names to API property names.



28
29
30
31
32
33
34
# File 'lib/mist_api/models/org_setting_mist_nac_idp.rb', line 28

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['exclude_realms'] = 'exclude_realms'
  @_hash['id'] = 'id'
  @_hash['user_realms'] = 'user_realms'
  @_hash
end

.nullablesObject

An array for nullable fields



46
47
48
# File 'lib/mist_api/models/org_setting_mist_nac_idp.rb', line 46

def self.nullables
  []
end

.optionalsObject

An array for optional fields



37
38
39
40
41
42
43
# File 'lib/mist_api/models/org_setting_mist_nac_idp.rb', line 37

def self.optionals
  %w[
    exclude_realms
    id
    user_realms
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



80
81
82
83
84
# File 'lib/mist_api/models/org_setting_mist_nac_idp.rb', line 80

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} exclude_realms: #{@exclude_realms.inspect}, id: #{@id.inspect},"\
  " user_realms: #{@user_realms.inspect}>"
end

#to_sObject

Provides a human-readable string representation of the object.



73
74
75
76
77
# File 'lib/mist_api/models/org_setting_mist_nac_idp.rb', line 73

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} exclude_realms: #{@exclude_realms}, id: #{@id}, user_realms:"\
  " #{@user_realms}>"
end