Class: MistApi::SamlMetadata

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

Overview

SamlMetadata 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(acs_url = SKIP, entity_id = SKIP, logout_url = SKIP, metadata = SKIP, scim_base_url = SKIP) ⇒ SamlMetadata

Returns a new instance of SamlMetadata.



59
60
61
62
63
64
65
66
# File 'lib/mist_api/models/saml_metadata.rb', line 59

def initialize(acs_url = SKIP, entity_id = SKIP, logout_url = SKIP,
                = SKIP, scim_base_url = SKIP)
  @acs_url = acs_url unless acs_url == SKIP
  @entity_id = entity_id unless entity_id == SKIP
  @logout_url = logout_url unless logout_url == SKIP
  @metadata =  unless  == SKIP
  @scim_base_url = scim_base_url unless scim_base_url == SKIP
end

Instance Attribute Details

#acs_urlString

If ‘idp_type`==`saml`

Returns:

  • (String)


14
15
16
# File 'lib/mist_api/models/saml_metadata.rb', line 14

def acs_url
  @acs_url
end

#entity_idString

If ‘idp_type`==`saml`

Returns:

  • (String)


18
19
20
# File 'lib/mist_api/models/saml_metadata.rb', line 18

def entity_id
  @entity_id
end

#logout_urlString

If ‘idp_type`==`saml`

Returns:

  • (String)


22
23
24
# File 'lib/mist_api/models/saml_metadata.rb', line 22

def logout_url
  @logout_url
end

#metadataString

If ‘idp_type`==`saml`

Returns:

  • (String)


26
27
28
# File 'lib/mist_api/models/saml_metadata.rb', line 26

def 
  @metadata
end

#scim_base_urlString

If ‘idp_type`==`oauth` and `scim_enabled`==`true`

Returns:

  • (String)


30
31
32
# File 'lib/mist_api/models/saml_metadata.rb', line 30

def scim_base_url
  @scim_base_url
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# File 'lib/mist_api/models/saml_metadata.rb', line 69

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  acs_url = hash.key?('acs_url') ? hash['acs_url'] : SKIP
  entity_id = hash.key?('entity_id') ? hash['entity_id'] : SKIP
  logout_url = hash.key?('logout_url') ? hash['logout_url'] : SKIP
   = hash.key?('metadata') ? hash['metadata'] : SKIP
  scim_base_url = hash.key?('scim_base_url') ? hash['scim_base_url'] : SKIP

  # Create object from extracted values.
  SamlMetadata.new(acs_url,
                   entity_id,
                   logout_url,
                   ,
                   scim_base_url)
end

.namesObject

A mapping from model property names to API property names.



33
34
35
36
37
38
39
40
41
# File 'lib/mist_api/models/saml_metadata.rb', line 33

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['acs_url'] = 'acs_url'
  @_hash['entity_id'] = 'entity_id'
  @_hash['logout_url'] = 'logout_url'
  @_hash['metadata'] = 'metadata'
  @_hash['scim_base_url'] = 'scim_base_url'
  @_hash
end

.nullablesObject

An array for nullable fields



55
56
57
# File 'lib/mist_api/models/saml_metadata.rb', line 55

def self.nullables
  []
end

.optionalsObject

An array for optional fields



44
45
46
47
48
49
50
51
52
# File 'lib/mist_api/models/saml_metadata.rb', line 44

def self.optionals
  %w[
    acs_url
    entity_id
    logout_url
    metadata
    scim_base_url
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



95
96
97
98
99
100
# File 'lib/mist_api/models/saml_metadata.rb', line 95

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} acs_url: #{@acs_url.inspect}, entity_id: #{@entity_id.inspect}, logout_url:"\
  " #{@logout_url.inspect}, metadata: #{@metadata.inspect}, scim_base_url:"\
  " #{@scim_base_url.inspect}>"
end

#to_sObject

Provides a human-readable string representation of the object.



88
89
90
91
92
# File 'lib/mist_api/models/saml_metadata.rb', line 88

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} acs_url: #{@acs_url}, entity_id: #{@entity_id}, logout_url: #{@logout_url},"\
  " metadata: #{@metadata}, scim_base_url: #{@scim_base_url}>"
end