Class: FlatApi::LtiConfiguration1p3Deployment

Inherits:
ApiModelBase
  • Object
show all
Defined in:
lib/flat_api/models/lti_configuration1p3_deployment.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 = {}) ⇒ LtiConfiguration1p3Deployment

Initializes the object

Parameters:

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

    Model attributes in the form of hash



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
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
# File 'lib/flat_api/models/lti_configuration1p3_deployment.rb', line 211

def initialize(attributes = {})
  if (!attributes.is_a?(Hash))
    fail ArgumentError, "The input argument (attributes) must be a hash in `FlatApi::LtiConfiguration1p3Deployment` 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::LtiConfiguration1p3Deployment`. 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?(:'id')
    self.id = attributes[:'id']
  else
    self.id = nil
  end

  if attributes.key?(:'lti_version')
    self.lti_version = attributes[:'lti_version']
  else
    self.lti_version = nil
  end

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

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

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

  if attributes.key?(:'creation_date')
    self.creation_date = attributes[:'creation_date']
  else
    self.creation_date = nil
  end

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

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

  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

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

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

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

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

Instance Attribute Details

#access_token_urlObject

OAuth2 token endpoint (for AGS/NRPS)



58
59
60
# File 'lib/flat_api/models/lti_configuration1p3_deployment.rb', line 58

def access_token_url
  @access_token_url
end

#authorization_urlObject

OIDC authorization/login endpoint



61
62
63
# File 'lib/flat_api/models/lti_configuration1p3_deployment.rb', line 61

def authorization_url
  @authorization_url
end

#client_idObject

OAuth2 client_id allocated by the platform



52
53
54
# File 'lib/flat_api/models/lti_configuration1p3_deployment.rb', line 52

def client_id
  @client_id
end

#creation_dateObject

Configuration creation date



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

def creation_date
  @creation_date
end

#creator_idObject

ID of the user who created this configuration



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

def creator_id
  @creator_id
end

#deployment_breakdown_byObject

Custom claim used for tenant identification (parent platforms only, read-only)



92
93
94
# File 'lib/flat_api/models/lti_configuration1p3_deployment.rb', line 92

def deployment_breakdown_by
  @deployment_breakdown_by
end

#deployment_breakdown_idObject

Value of the custom claim that identifies this specific tenant (child platforms only)



95
96
97
# File 'lib/flat_api/models/lti_configuration1p3_deployment.rb', line 95

def deployment_breakdown_id
  @deployment_breakdown_id
end

#deployment_idObject

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



55
56
57
# File 'lib/flat_api/models/lti_configuration1p3_deployment.rb', line 55

def deployment_id
  @deployment_id
end

#deployment_keyObject

Deployment key (e.g., schoology, classlink)



89
90
91
# File 'lib/flat_api/models/lti_configuration1p3_deployment.rb', line 89

def deployment_key
  @deployment_key
end

#deployment_modeObject

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



67
68
69
# File 'lib/flat_api/models/lti_configuration1p3_deployment.rb', line 67

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.



83
84
85
# File 'lib/flat_api/models/lti_configuration1p3_deployment.rb', line 83

def enable_email_matching
  @enable_email_matching
end

#idObject

Configuration ID



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

def id
  @id
end

#initiate_login_urlObject

URL for the platform to initiate LTI login



77
78
79
# File 'lib/flat_api/models/lti_configuration1p3_deployment.rb', line 77

def 
  @initiate_login_url
end

#jwks_urlObject

Platform JWKS endpoint (public keys)



64
65
66
# File 'lib/flat_api/models/lti_configuration1p3_deployment.rb', line 64

def jwks_url
  @jwks_url
end

#last_used_dateObject

Last time this configuration was used



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

def last_used_date
  @last_used_date
end

#lti_versionObject

LTI version (1.3)



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

def lti_version
  @lti_version
end

#modeObject

Deployment-based LTI 1.3 configuration mode



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

def mode
  @mode
end

#organization_idObject

Organization ID



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

def organization_id
  @organization_id
end

#organization_nameObject

Organization name



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

def organization_name
  @organization_name
end

#parent_idObject

Parent configuration ID (for deployment-based configs)



86
87
88
# File 'lib/flat_api/models/lti_configuration1p3_deployment.rb', line 86

def parent_id
  @parent_id
end

#platform_issObject

Platform issuer URL



46
47
48
# File 'lib/flat_api/models/lti_configuration1p3_deployment.rb', line 46

def platform_iss
  @platform_iss
end

#platform_nameObject

Platform display name



49
50
51
# File 'lib/flat_api/models/lti_configuration1p3_deployment.rb', line 49

def platform_name
  @platform_name
end

#public_keyset_urlObject

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



74
75
76
# File 'lib/flat_api/models/lti_configuration1p3_deployment.rb', line 74

def public_keyset_url
  @public_keyset_url
end

#redirect_urisObject

Allowed redirect URIs for LTI launches



80
81
82
# File 'lib/flat_api/models/lti_configuration1p3_deployment.rb', line 80

def redirect_uris
  @redirect_uris
end

#statusObject

Configuration status indicator



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

def status
  @status
end

#supported_servicesObject

Returns the value of attribute supported_services.



69
70
71
# File 'lib/flat_api/models/lti_configuration1p3_deployment.rb', line 69

def supported_services
  @supported_services
end

#toolObject

Returns the value of attribute tool.



71
72
73
# File 'lib/flat_api/models/lti_configuration1p3_deployment.rb', line 71

def tool
  @tool
end

Class Method Details

.acceptable_attribute_mapObject

Returns attribute mapping this model knows about



153
154
155
# File 'lib/flat_api/models/lti_configuration1p3_deployment.rb', line 153

def self.acceptable_attribute_map
  attribute_map
end

.acceptable_attributesObject

Returns all the JSON keys this model knows about



158
159
160
# File 'lib/flat_api/models/lti_configuration1p3_deployment.rb', line 158

def self.acceptable_attributes
  acceptable_attribute_map.values
end

.attribute_mapObject

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



120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
# File 'lib/flat_api/models/lti_configuration1p3_deployment.rb', line 120

def self.attribute_map
  {
    :'id' => :'id',
    :'lti_version' => :'ltiVersion',
    :'organization_id' => :'organizationId',
    :'organization_name' => :'organizationName',
    :'creator_id' => :'creatorId',
    :'creation_date' => :'creationDate',
    :'last_used_date' => :'lastUsedDate',
    :'status' => :'status',
    :'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',
    :'parent_id' => :'parentId',
    :'deployment_key' => :'deploymentKey',
    :'deployment_breakdown_by' => :'deploymentBreakdownBy',
    :'deployment_breakdown_id' => :'deploymentBreakdownId'
  }
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



491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
# File 'lib/flat_api/models/lti_configuration1p3_deployment.rb', line 491

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_all_ofObject

List of class defined in allOf (OpenAPI v3)



202
203
204
205
206
207
# File 'lib/flat_api/models/lti_configuration1p3_deployment.rb', line 202

def self.openapi_all_of
  [
  :'LtiConfiguration1p3Base',
  :'LtiConfigurationBase'
  ]
end

.openapi_nullableObject

List of attributes with nullable: true



196
197
198
199
# File 'lib/flat_api/models/lti_configuration1p3_deployment.rb', line 196

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

.openapi_typesObject

Attribute type mapping.



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
# File 'lib/flat_api/models/lti_configuration1p3_deployment.rb', line 163

def self.openapi_types
  {
    :'id' => :'String',
    :'lti_version' => :'String',
    :'organization_id' => :'String',
    :'organization_name' => :'String',
    :'creator_id' => :'String',
    :'creation_date' => :'Time',
    :'last_used_date' => :'Time',
    :'status' => :'String',
    :'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',
    :'parent_id' => :'String',
    :'deployment_key' => :'String',
    :'deployment_breakdown_by' => :'String',
    :'deployment_breakdown_id' => :'String'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
# File 'lib/flat_api/models/lti_configuration1p3_deployment.rb', line 444

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      id == o.id &&
      lti_version == o.lti_version &&
      organization_id == o.organization_id &&
      organization_name == o.organization_name &&
      creator_id == o.creator_id &&
      creation_date == o.creation_date &&
      last_used_date == o.last_used_date &&
      status == o.status &&
      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 &&
      parent_id == o.parent_id &&
      deployment_key == o.deployment_key &&
      deployment_breakdown_by == o.deployment_breakdown_by &&
      deployment_breakdown_id == o.deployment_breakdown_id
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


478
479
480
# File 'lib/flat_api/models/lti_configuration1p3_deployment.rb', line 478

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



484
485
486
# File 'lib/flat_api/models/lti_configuration1p3_deployment.rb', line 484

def hash
  [id, lti_version, organization_id, organization_name, creator_id, creation_date, last_used_date, status, 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, parent_id, deployment_key, deployment_breakdown_by, deployment_breakdown_id].hash
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
# File 'lib/flat_api/models/lti_configuration1p3_deployment.rb', line 346

def list_invalid_properties
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
  invalid_properties = Array.new
  if @id.nil?
    invalid_properties.push('invalid value for "id", id cannot be nil.')
  end

  if @lti_version.nil?
    invalid_properties.push('invalid value for "lti_version", lti_version cannot be nil.')
  end

  if @creation_date.nil?
    invalid_properties.push('invalid value for "creation_date", creation_date cannot be nil.')
  end

  invalid_properties
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



513
514
515
516
517
518
519
520
521
522
523
524
525
# File 'lib/flat_api/models/lti_configuration1p3_deployment.rb', line 513

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



366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
# File 'lib/flat_api/models/lti_configuration1p3_deployment.rb', line 366

def valid?
  warn '[DEPRECATED] the `valid?` method is obsolete'
  return false if @id.nil?
  return false if @lti_version.nil?
  lti_version_validator = EnumAttributeValidator.new('String', ["1p3"])
  return false unless lti_version_validator.valid?(@lti_version)
  return false if @creation_date.nil?
  status_validator = EnumAttributeValidator.new('String', ["ready-to-use", "in-use", "incomplete-setup"])
  return false unless status_validator.valid?(@status)
  mode_validator = EnumAttributeValidator.new('String', ["1p3-deployment"])
  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