Class: OryClient::ProjectPatch

Inherits:
Object
  • Object
show all
Defined in:
lib/ory-client/models/project_patch.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ ProjectPatch

Initializes the object

Parameters:

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

    Model attributes in the form of hash



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
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
# File 'lib/ory-client/models/project_patch.rb', line 146

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Instance Attribute Details

#api_urlObject

URL of Project API In the future will allow to override Kratos project URL. If set, error is returned. If left empty our hosted URL is used



19
20
21
# File 'lib/ory-client/models/project_patch.rb', line 19

def api_url
  @api_url
end

#application_urlObject

URL where your application is available. Your users will be redirected to this URL when they successfully complete a login, logout, verification, recovery, or registration flow. More fine-grained redirection patterns are available for the individual flows (login, registration, …). If left empty, our hosted URL will be used instead. It contains technical information on the identities and is useful when developing a new project or trying out Ory Cloud.



22
23
24
# File 'lib/ory-client/models/project_patch.rb', line 22

def application_url
  @application_url
end

#default_identity_schema_urlObject

Default Identity Schema URL This represents your Ory Kratos Default Identity Schema. It is your identity's default schema. This allows setting custom fields such as "address", specifying whether you want to log in using email or a username, and more. For more information on this topic, please check out the identity documentation. If KratosCustomSchemaID is also added to the payload, it will be preferred and replace the value of DefaultIdentitySchemaURL set by the client. The value of this field can be either any "https://" URL - for example a file hosted at GitHub, or a `preset://`-prefixed string. Available presets are: preset://email preset://username preset://basic preset://blank



25
26
27
# File 'lib/ory-client/models/project_patch.rb', line 25

def default_identity_schema_url
  @default_identity_schema_url
end

#error_ui_urlObject

Self-Service Error UI URL Sets the UI URL for the error UI. If left empty, this will use Ory's hosted pages.



28
29
30
# File 'lib/ory-client/models/project_patch.rb', line 28

def error_ui_url
  @error_ui_url
end

#kratos_custom_schema_idObject

The Custom Schema ID The custom schema ID is a preferred field over DefaultIdentitySchemaURL, meaning it will override the DefaultIdentitySchemaURL with the custom schema's URL instead of accepting it from the client-side. Once this field is set the given custom schema will be associated with this project.



31
32
33
# File 'lib/ory-client/models/project_patch.rb', line 31

def kratos_custom_schema_id
  @kratos_custom_schema_id
end

#login_ui_urlObject

Self-Service Login UI URL Sets the UI URL for the login UI. If left empty, this will use Ory's hosted pages.



34
35
36
# File 'lib/ory-client/models/project_patch.rb', line 34

def 
  @login_ui_url
end

#lookup_secretObject

Returns the value of attribute lookup_secret.



36
37
38
# File 'lib/ory-client/models/project_patch.rb', line 36

def lookup_secret
  @lookup_secret
end

#nameObject

The project name. Helps you identify your project. in: body



39
40
41
# File 'lib/ory-client/models/project_patch.rb', line 39

def name
  @name
end

#passwordObject

Returns the value of attribute password.



41
42
43
# File 'lib/ory-client/models/project_patch.rb', line 41

def password
  @password
end

#recoveryObject

Returns the value of attribute recovery.



43
44
45
# File 'lib/ory-client/models/project_patch.rb', line 43

def recovery
  @recovery
end

#recovery_ui_urlObject

Self-Service Login UI URL Sets the UI URL for the recovery UI. If left empty, this will use Ory's hosted pages.



46
47
48
# File 'lib/ory-client/models/project_patch.rb', line 46

def recovery_ui_url
  @recovery_ui_url
end

#redirection_configObject

Returns the value of attribute redirection_config.



48
49
50
# File 'lib/ory-client/models/project_patch.rb', line 48

def redirection_config
  @redirection_config
end

#registration_ui_urlObject

Self-Service Login UI URL Sets the UI URL for the registration UI. If left empty, this will use Ory's hosted pages.



51
52
53
# File 'lib/ory-client/models/project_patch.rb', line 51

def registration_ui_url
  @registration_ui_url
end

#session_after_sign_upObject

Issue Session after Sign Up If set to true, users will receive a session after they successfully signed up. Enabling this option allows account enumeration during registration flows. Read more: www.ory.sh/kratos/docs/self-service/flows/user-registration#successful-registration



54
55
56
# File 'lib/ory-client/models/project_patch.rb', line 54

def 
  @session_after_sign_up
end

#session_soft_2faObject

Enable Soft 2FA for Login Sessions



57
58
59
# File 'lib/ory-client/models/project_patch.rb', line 57

def session_soft_2fa
  @session_soft_2fa
end

#settings_privileged_session_max_age_secondsObject

Duration in Seconds of how long a Session is Privileged Defines how long a session is considered privileged in seconds. If the session's authenticated_at is older than the value specified here, the user needs to re-authenticate to perform certain actions (e.g. password change).



60
61
62
# File 'lib/ory-client/models/project_patch.rb', line 60

def settings_privileged_session_max_age_seconds
  @settings_privileged_session_max_age_seconds
end

#settings_soft_2faObject

Enable Soft 2FA for Self-Service Settings Flows



63
64
65
# File 'lib/ory-client/models/project_patch.rb', line 63

def settings_soft_2fa
  @settings_soft_2fa
end

#settings_ui_urlObject

Self-Service Settings UI URL Sets the UI URL for the settings UI. If left empty, this will use Ory's hosted pages.



66
67
68
# File 'lib/ory-client/models/project_patch.rb', line 66

def settings_ui_url
  @settings_ui_url
end

#totpObject

Returns the value of attribute totp.



68
69
70
# File 'lib/ory-client/models/project_patch.rb', line 68

def totp
  @totp
end

#verificationObject

Returns the value of attribute verification.



70
71
72
# File 'lib/ory-client/models/project_patch.rb', line 70

def verification
  @verification
end

#verification_ui_urlObject

Self-Service Login UI URL Sets the UI URL for the verification UI. If left empty, this will use Ory's hosted pages.



73
74
75
# File 'lib/ory-client/models/project_patch.rb', line 73

def verification_ui_url
  @verification_ui_url
end

#webauthnObject

Returns the value of attribute webauthn.



75
76
77
# File 'lib/ory-client/models/project_patch.rb', line 75

def webauthn
  @webauthn
end

Class Method Details

.acceptable_attributesObject

Returns all the JSON keys this model knows about



106
107
108
# File 'lib/ory-client/models/project_patch.rb', line 106

def self.acceptable_attributes
  attribute_map.values
end

.attribute_mapObject

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



78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# File 'lib/ory-client/models/project_patch.rb', line 78

def self.attribute_map
  {
    :'api_url' => :'api_url',
    :'application_url' => :'application_url',
    :'default_identity_schema_url' => :'default_identity_schema_url',
    :'error_ui_url' => :'error_ui_url',
    :'kratos_custom_schema_id' => :'kratos_custom_schema_id',
    :'login_ui_url' => :'login_ui_url',
    :'lookup_secret' => :'lookup_secret',
    :'name' => :'name',
    :'password' => :'password',
    :'recovery' => :'recovery',
    :'recovery_ui_url' => :'recovery_ui_url',
    :'redirection_config' => :'redirection_config',
    :'registration_ui_url' => :'registration_ui_url',
    :'session_after_sign_up' => :'session_after_sign_up',
    :'session_soft_2fa' => :'session_soft_2fa',
    :'settings_privileged_session_max_age_seconds' => :'settings_privileged_session_max_age_seconds',
    :'settings_soft_2fa' => :'settings_soft_2fa',
    :'settings_ui_url' => :'settings_ui_url',
    :'totp' => :'totp',
    :'verification' => :'verification',
    :'verification_ui_url' => :'verification_ui_url',
    :'webauthn' => :'webauthn'
  }
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



385
386
387
# File 'lib/ory-client/models/project_patch.rb', line 385

def self.build_from_hash(attributes)
  new.build_from_hash(attributes)
end

.openapi_nullableObject

List of attributes with nullable: true



139
140
141
142
# File 'lib/ory-client/models/project_patch.rb', line 139

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

.openapi_typesObject

Attribute type mapping.



111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
# File 'lib/ory-client/models/project_patch.rb', line 111

def self.openapi_types
  {
    :'api_url' => :'String',
    :'application_url' => :'String',
    :'default_identity_schema_url' => :'String',
    :'error_ui_url' => :'String',
    :'kratos_custom_schema_id' => :'String',
    :'login_ui_url' => :'String',
    :'lookup_secret' => :'ProjectLookupSecretConfig',
    :'name' => :'String',
    :'password' => :'ProjectPasswordConfig',
    :'recovery' => :'ProjectRecoveryConfig',
    :'recovery_ui_url' => :'String',
    :'redirection_config' => :'RedirectionConfig',
    :'registration_ui_url' => :'String',
    :'session_after_sign_up' => :'Boolean',
    :'session_soft_2fa' => :'Boolean',
    :'settings_privileged_session_max_age_seconds' => :'Integer',
    :'settings_soft_2fa' => :'Boolean',
    :'settings_ui_url' => :'String',
    :'totp' => :'ProjectTotpConfig',
    :'verification' => :'ProjectVerificationConfig',
    :'verification_ui_url' => :'String',
    :'webauthn' => :'ProjectWebAuthnConfig'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
# File 'lib/ory-client/models/project_patch.rb', line 343

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      api_url == o.api_url &&
      application_url == o.application_url &&
      default_identity_schema_url == o.default_identity_schema_url &&
      error_ui_url == o.error_ui_url &&
      kratos_custom_schema_id == o.kratos_custom_schema_id &&
       == o. &&
      lookup_secret == o.lookup_secret &&
      name == o.name &&
      password == o.password &&
      recovery == o.recovery &&
      recovery_ui_url == o.recovery_ui_url &&
      redirection_config == o.redirection_config &&
      registration_ui_url == o.registration_ui_url &&
       == o. &&
      session_soft_2fa == o.session_soft_2fa &&
      settings_privileged_session_max_age_seconds == o.settings_privileged_session_max_age_seconds &&
      settings_soft_2fa == o.settings_soft_2fa &&
      settings_ui_url == o.settings_ui_url &&
      totp == o.totp &&
      verification == o.verification &&
      verification_ui_url == o.verification_ui_url &&
      webauthn == o.webauthn
end

#_deserialize(type, value) ⇒ Object

Deserializes the data based on type

Parameters:

  • string

    type Data type

  • string

    value Value to be deserialized

Returns:

  • (Object)

    Deserialized data



415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
# File 'lib/ory-client/models/project_patch.rb', line 415

def _deserialize(type, value)
  case type.to_sym
  when :Time
    Time.parse(value)
  when :Date
    Date.parse(value)
  when :String
    value.to_s
  when :Integer
    value.to_i
  when :Float
    value.to_f
  when :Boolean
    if value.to_s =~ /\A(true|t|yes|y|1)\z/i
      true
    else
      false
    end
  when :Object
    # generic object (usually a Hash), return directly
    value
  when /\AArray<(?<inner_type>.+)>\z/
    inner_type = Regexp.last_match[:inner_type]
    value.map { |v| _deserialize(inner_type, v) }
  when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
    k_type = Regexp.last_match[:k_type]
    v_type = Regexp.last_match[:v_type]
    {}.tap do |hash|
      value.each do |k, v|
        hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
      end
    end
  else # model
    # models (e.g. Pet) or oneOf
    klass = OryClient.const_get(type)
    klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
  end
end

#_to_hash(value) ⇒ Hash

Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value

Parameters:

  • value (Object)

    Any valid value

Returns:

  • (Hash)

    Returns the value in the form of hash



486
487
488
489
490
491
492
493
494
495
496
497
498
# File 'lib/ory-client/models/project_patch.rb', line 486

def _to_hash(value)
  if value.is_a?(Array)
    value.compact.map { |v| _to_hash(v) }
  elsif value.is_a?(Hash)
    {}.tap do |hash|
      value.each { |k, v| hash[k] = _to_hash(v) }
    end
  elsif value.respond_to? :to_hash
    value.to_hash
  else
    value
  end
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



392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
# File 'lib/ory-client/models/project_patch.rb', line 392

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)
  self.class.openapi_types.each_pair do |key, type|
    if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
      self.send("#{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[self.class.attribute_map[key]].is_a?(Array)
        self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
      end
    elsif !attributes[self.class.attribute_map[key]].nil?
      self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
    end
  end

  self
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


372
373
374
# File 'lib/ory-client/models/project_patch.rb', line 372

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



378
379
380
# File 'lib/ory-client/models/project_patch.rb', line 378

def hash
  [api_url, application_url, default_identity_schema_url, error_ui_url, kratos_custom_schema_id, , lookup_secret, name, password, recovery, recovery_ui_url, redirection_config, registration_ui_url, , session_soft_2fa, settings_privileged_session_max_age_seconds, settings_soft_2fa, settings_ui_url, totp, verification, verification_ui_url, webauthn].hash
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



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
# File 'lib/ory-client/models/project_patch.rb', line 250

def list_invalid_properties
  invalid_properties = Array.new
  if @error_ui_url.nil?
    invalid_properties.push('invalid value for "error_ui_url", error_ui_url cannot be nil.')
  end

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  invalid_properties
end

#to_bodyHash

to_body is an alias to to_hash (backward compatibility)

Returns:

  • (Hash)

    Returns the object in the form of hash



462
463
464
# File 'lib/ory-client/models/project_patch.rb', line 462

def to_body
  to_hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



468
469
470
471
472
473
474
475
476
477
478
479
480
# File 'lib/ory-client/models/project_patch.rb', line 468

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

#to_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



456
457
458
# File 'lib/ory-client/models/project_patch.rb', line 456

def to_s
  to_hash.to_s
end

#valid?Boolean

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

Returns:

  • (Boolean)

    true if the model is valid



321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
# File 'lib/ory-client/models/project_patch.rb', line 321

def valid?
  return false if @error_ui_url.nil?
  return false if @login_ui_url.nil?
  return false if @lookup_secret.nil?
  return false if @password.nil?
  return false if @recovery.nil?
  return false if @recovery_ui_url.nil?
  return false if @registration_ui_url.nil?
  return false if @session_after_sign_up.nil?
  return false if @session_soft_2fa.nil?
  return false if @settings_privileged_session_max_age_seconds.nil?
  return false if @settings_soft_2fa.nil?
  return false if @settings_ui_url.nil?
  return false if @totp.nil?
  return false if @verification.nil?
  return false if @verification_ui_url.nil?
  return false if @webauthn.nil?
  true
end