Class: FlatApi::LtiConfiguration1p3Base

Inherits:
ApiModelBase show all
Defined in:
lib/flat_api/models/lti_configuration1p3_base.rb

Defined Under Namespace

Classes: EnumAttributeValidator

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from ApiModelBase

_deserialize, #_to_hash, #to_body, #to_s

Constructor Details

#initialize(attributes = {}) ⇒ LtiConfiguration1p3Base

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
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
191
192
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
# File 'lib/flat_api/models/lti_configuration1p3_base.rb', line 143

def initialize(attributes = {})
  if (!attributes.is_a?(Hash))
    fail ArgumentError, "The input argument (attributes) must be a hash in `FlatApi::LtiConfiguration1p3Base` initialize method"
  end

  # check to see if the attribute exists and convert string to symbol for hash key
  acceptable_attribute_map = self.class.acceptable_attribute_map
  attributes = attributes.each_with_object({}) { |(k, v), h|
    if (!acceptable_attribute_map.key?(k.to_sym))
      fail ArgumentError, "`#{k}` is not a valid attribute in `FlatApi::LtiConfiguration1p3Base`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
    end
    h[k.to_sym] = v
  }

  if attributes.key?(:'mode')
    self.mode = attributes[:'mode']
  end

  if attributes.key?(:'platform_iss')
    self.platform_iss = attributes[:'platform_iss']
  end

  if attributes.key?(:'platform_name')
    self.platform_name = attributes[:'platform_name']
  end

  if attributes.key?(:'client_id')
    self.client_id = attributes[:'client_id']
  end

  if attributes.key?(:'deployment_id')
    self.deployment_id = attributes[:'deployment_id']
  end

  if attributes.key?(:'access_token_url')
    self.access_token_url = attributes[:'access_token_url']
  end

  if attributes.key?(:'authorization_url')
    self.authorization_url = attributes[:'authorization_url']
  end

  if attributes.key?(:'jwks_url')
    self.jwks_url = attributes[:'jwks_url']
  end

  if attributes.key?(:'deployment_mode')
    self.deployment_mode = attributes[:'deployment_mode']
  end

  if attributes.key?(:'supported_services')
    self.supported_services = attributes[:'supported_services']
  end

  if attributes.key?(:'tool')
    self.tool = attributes[:'tool']
  end

  if attributes.key?(:'public_keyset_url')
    self.public_keyset_url = attributes[:'public_keyset_url']
  end

  if attributes.key?(:'initiate_login_url')
    self. = attributes[:'initiate_login_url']
  end

  if attributes.key?(:'redirect_uris')
    if (value = attributes[:'redirect_uris']).is_a?(Array)
      self.redirect_uris = value
    end
  end

  if attributes.key?(:'enable_email_matching')
    self.enable_email_matching = attributes[:'enable_email_matching']
  else
    self.enable_email_matching = true
  end
end

Instance Attribute Details

#access_token_urlObject

OAuth2 token endpoint (for AGS/NRPS)



34
35
36
# File 'lib/flat_api/models/lti_configuration1p3_base.rb', line 34

def access_token_url
  @access_token_url
end

#authorization_urlObject

OIDC authorization/login endpoint



37
38
39
# File 'lib/flat_api/models/lti_configuration1p3_base.rb', line 37

def authorization_url
  @authorization_url
end

#client_idObject

OAuth2 client_id allocated by the platform



28
29
30
# File 'lib/flat_api/models/lti_configuration1p3_base.rb', line 28

def client_id
  @client_id
end

#deployment_idObject

Deployment ID linking the tool to a tenant/class (varies by platform)



31
32
33
# File 'lib/flat_api/models/lti_configuration1p3_base.rb', line 31

def deployment_id
  @deployment_id
end

#deployment_modeObject

Deployment mode (single for organization-specific, multi for shared parent platforms)



43
44
45
# File 'lib/flat_api/models/lti_configuration1p3_base.rb', line 43

def deployment_mode
  @deployment_mode
end

#enable_email_matchingObject

Enable email-based user matching during LTI authentication. When true (default): If a user with the same email exists in the organization, they will be matched and logged in instead of creating a new account. When false: Email matching is disabled. Only LTI ID matching is used, which means multiple LTI users can share the same email address and have separate Flat accounts. This is useful for cases like siblings sharing a parent email in the LMS.



59
60
61
# File 'lib/flat_api/models/lti_configuration1p3_base.rb', line 59

def enable_email_matching
  @enable_email_matching
end

#initiate_login_urlObject

URL for the platform to initiate LTI login



53
54
55
# File 'lib/flat_api/models/lti_configuration1p3_base.rb', line 53

def 
  @initiate_login_url
end

#jwks_urlObject

Platform JWKS endpoint (public keys)



40
41
42
# File 'lib/flat_api/models/lti_configuration1p3_base.rb', line 40

def jwks_url
  @jwks_url
end

#modeObject

LTI 1.3 configuration mode



19
20
21
# File 'lib/flat_api/models/lti_configuration1p3_base.rb', line 19

def mode
  @mode
end

#platform_issObject

Platform issuer URL



22
23
24
# File 'lib/flat_api/models/lti_configuration1p3_base.rb', line 22

def platform_iss
  @platform_iss
end

#platform_nameObject

Platform display name



25
26
27
# File 'lib/flat_api/models/lti_configuration1p3_base.rb', line 25

def platform_name
  @platform_name
end

#public_keyset_urlObject

Public keyset URL for the platform to retrieve Flat's public keys



50
51
52
# File 'lib/flat_api/models/lti_configuration1p3_base.rb', line 50

def public_keyset_url
  @public_keyset_url
end

#redirect_urisObject

Allowed redirect URIs for LTI launches



56
57
58
# File 'lib/flat_api/models/lti_configuration1p3_base.rb', line 56

def redirect_uris
  @redirect_uris
end

#supported_servicesObject

Returns the value of attribute supported_services.



45
46
47
# File 'lib/flat_api/models/lti_configuration1p3_base.rb', line 45

def supported_services
  @supported_services
end

#toolObject

Returns the value of attribute tool.



47
48
49
# File 'lib/flat_api/models/lti_configuration1p3_base.rb', line 47

def tool
  @tool
end

Class Method Details

.acceptable_attribute_mapObject

Returns attribute mapping this model knows about



105
106
107
# File 'lib/flat_api/models/lti_configuration1p3_base.rb', line 105

def self.acceptable_attribute_map
  attribute_map
end

.acceptable_attributesObject

Returns all the JSON keys this model knows about



110
111
112
# File 'lib/flat_api/models/lti_configuration1p3_base.rb', line 110

def self.acceptable_attributes
  acceptable_attribute_map.values
end

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# File 'lib/flat_api/models/lti_configuration1p3_base.rb', line 84

def self.attribute_map
  {
    :'mode' => :'mode',
    :'platform_iss' => :'platformIss',
    :'platform_name' => :'platformName',
    :'client_id' => :'clientId',
    :'deployment_id' => :'deploymentId',
    :'access_token_url' => :'accessTokenUrl',
    :'authorization_url' => :'authorizationUrl',
    :'jwks_url' => :'jwksUrl',
    :'deployment_mode' => :'deploymentMode',
    :'supported_services' => :'supportedServices',
    :'tool' => :'tool',
    :'public_keyset_url' => :'publicKeysetUrl',
    :'initiate_login_url' => :'initiateLoginUrl',
    :'redirect_uris' => :'redirectUris',
    :'enable_email_matching' => :'enableEmailMatching'
  }
end

.build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
# File 'lib/flat_api/models/lti_configuration1p3_base.rb', line 298

def self.build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)
  attributes = attributes.transform_keys(&:to_sym)
  transformed_hash = {}
  openapi_types.each_pair do |key, type|
    if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
      transformed_hash["#{key}"] = nil
    elsif type =~ /\AArray<(.*)>/i
      # check to ensure the input is an array given that the attribute
      # is documented as an array but the input is not
      if attributes[attribute_map[key]].is_a?(Array)
        transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
      end
    elsif !attributes[attribute_map[key]].nil?
      transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
    end
  end
  new(transformed_hash)
end

.openapi_nullableObject

List of attributes with nullable: true



136
137
138
139
# File 'lib/flat_api/models/lti_configuration1p3_base.rb', line 136

def self.openapi_nullable
  Set.new([
  ])
end

.openapi_typesObject

Attribute type mapping.



115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# File 'lib/flat_api/models/lti_configuration1p3_base.rb', line 115

def self.openapi_types
  {
    :'mode' => :'String',
    :'platform_iss' => :'String',
    :'platform_name' => :'String',
    :'client_id' => :'String',
    :'deployment_id' => :'String',
    :'access_token_url' => :'String',
    :'authorization_url' => :'String',
    :'jwks_url' => :'String',
    :'deployment_mode' => :'String',
    :'supported_services' => :'LtiConfiguration1p3BaseSupportedServices',
    :'tool' => :'LtiConfiguration1p3BaseTool',
    :'public_keyset_url' => :'String',
    :'initiate_login_url' => :'String',
    :'redirect_uris' => :'Array<String>',
    :'enable_email_matching' => :'Boolean'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
# File 'lib/flat_api/models/lti_configuration1p3_base.rb', line 263

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      mode == o.mode &&
      platform_iss == o.platform_iss &&
      platform_name == o.platform_name &&
      client_id == o.client_id &&
      deployment_id == o.deployment_id &&
      access_token_url == o.access_token_url &&
      authorization_url == o.authorization_url &&
      jwks_url == o.jwks_url &&
      deployment_mode == o.deployment_mode &&
      supported_services == o.supported_services &&
      tool == o.tool &&
      public_keyset_url == o.public_keyset_url &&
       == o. &&
      redirect_uris == o.redirect_uris &&
      enable_email_matching == o.enable_email_matching
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


285
286
287
# File 'lib/flat_api/models/lti_configuration1p3_base.rb', line 285

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



291
292
293
# File 'lib/flat_api/models/lti_configuration1p3_base.rb', line 291

def hash
  [mode, platform_iss, platform_name, client_id, deployment_id, access_token_url, authorization_url, jwks_url, deployment_mode, supported_services, tool, public_keyset_url, , redirect_uris, enable_email_matching].hash
end

#list_invalid_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



224
225
226
227
228
# File 'lib/flat_api/models/lti_configuration1p3_base.rb', line 224

def list_invalid_properties
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
  invalid_properties = Array.new
  invalid_properties
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



320
321
322
323
324
325
326
327
328
329
330
331
332
# File 'lib/flat_api/models/lti_configuration1p3_base.rb', line 320

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = self.send(attr)
    if value.nil?
      is_nullable = self.class.openapi_nullable.include?(attr)
      next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
    end

    hash[param] = _to_hash(value)
  end
  hash
end

#valid?Boolean

Check to see if the all the properties in the model are valid

Returns:

  • (Boolean)

    true if the model is valid



232
233
234
235
236
237
238
239
# File 'lib/flat_api/models/lti_configuration1p3_base.rb', line 232

def valid?
  warn '[DEPRECATED] the `valid?` method is obsolete'
  mode_validator = EnumAttributeValidator.new('String', ["1p3-manual", "1p3-deployment", "1p3-dynamic"])
  return false unless mode_validator.valid?(@mode)
  deployment_mode_validator = EnumAttributeValidator.new('String', ["single", "multi"])
  return false unless deployment_mode_validator.valid?(@deployment_mode)
  true
end