Class: Hook0::Generated::InstanceConfig
- Inherits:
-
Object
- Object
- Hook0::Generated::InstanceConfig
- Defined in:
- lib/hook0/generated/models.rb
Overview
The InstanceConfig the API declares.
Instance Attribute Summary collapse
-
#application_secret_compatibility ⇒ Object
readonly
Returns the value of attribute application_secret_compatibility.
-
#auto_db_migration ⇒ Object
readonly
Returns the value of attribute auto_db_migration.
-
#biscuit_public_key ⇒ Object
readonly
Returns the value of attribute biscuit_public_key.
-
#cloudflare_turnstile_site_key ⇒ Object
readonly
Returns the value of attribute cloudflare_turnstile_site_key.
-
#formbricks ⇒ Object
readonly
Returns the value of attribute formbricks.
-
#matomo ⇒ Object
readonly
Returns the value of attribute matomo.
-
#password_minimum_length ⇒ Object
readonly
Returns the value of attribute password_minimum_length.
-
#quota_enforcement ⇒ Object
readonly
Returns the value of attribute quota_enforcement.
-
#registration_disabled ⇒ Object
readonly
Returns the value of attribute registration_disabled.
-
#support_email_address ⇒ Object
readonly
Returns the value of attribute support_email_address.
Class Method Summary collapse
-
.from_json(value) ⇒ InstanceConfig
Read one out of what the API answered.
Instance Method Summary collapse
-
#==(other) ⇒ Boolean
(also: #eql?)
Whether that value carries the same members as this one.
-
#hash ⇒ Integer
A value two equal instances share, so that either may key a hash.
-
#initialize(application_secret_compatibility:, auto_db_migration:, biscuit_public_key:, password_minimum_length:, quota_enforcement:, registration_disabled:, support_email_address:, cloudflare_turnstile_site_key: nil, formbricks: nil, matomo: nil) ⇒ InstanceConfig
constructor
A new instance of InstanceConfig.
-
#to_h ⇒ Hash{String => Object}
Write one back the way the API reads it.
Constructor Details
#initialize(application_secret_compatibility:, auto_db_migration:, biscuit_public_key:, password_minimum_length:, quota_enforcement:, registration_disabled:, support_email_address:, cloudflare_turnstile_site_key: nil, formbricks: nil, matomo: nil) ⇒ InstanceConfig
Returns a new instance of InstanceConfig.
1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 |
# File 'lib/hook0/generated/models.rb', line 1274 def initialize( application_secret_compatibility:, auto_db_migration:, biscuit_public_key:, password_minimum_length:, quota_enforcement:, registration_disabled:, support_email_address:, cloudflare_turnstile_site_key: nil, formbricks: nil, matomo: nil ) @application_secret_compatibility = application_secret_compatibility @auto_db_migration = auto_db_migration @biscuit_public_key = biscuit_public_key @password_minimum_length = password_minimum_length @quota_enforcement = quota_enforcement @registration_disabled = registration_disabled @support_email_address = support_email_address @cloudflare_turnstile_site_key = cloudflare_turnstile_site_key @formbricks = formbricks @matomo = matomo freeze end |
Instance Attribute Details
#application_secret_compatibility ⇒ Object (readonly)
Returns the value of attribute application_secret_compatibility.
1253 1254 1255 |
# File 'lib/hook0/generated/models.rb', line 1253 def application_secret_compatibility @application_secret_compatibility end |
#auto_db_migration ⇒ Object (readonly)
Returns the value of attribute auto_db_migration.
1253 1254 1255 |
# File 'lib/hook0/generated/models.rb', line 1253 def auto_db_migration @auto_db_migration end |
#biscuit_public_key ⇒ Object (readonly)
Returns the value of attribute biscuit_public_key.
1253 1254 1255 |
# File 'lib/hook0/generated/models.rb', line 1253 def biscuit_public_key @biscuit_public_key end |
#cloudflare_turnstile_site_key ⇒ Object (readonly)
Returns the value of attribute cloudflare_turnstile_site_key.
1253 1254 1255 |
# File 'lib/hook0/generated/models.rb', line 1253 def cloudflare_turnstile_site_key @cloudflare_turnstile_site_key end |
#formbricks ⇒ Object (readonly)
Returns the value of attribute formbricks.
1253 1254 1255 |
# File 'lib/hook0/generated/models.rb', line 1253 def formbricks @formbricks end |
#matomo ⇒ Object (readonly)
Returns the value of attribute matomo.
1253 1254 1255 |
# File 'lib/hook0/generated/models.rb', line 1253 def matomo @matomo end |
#password_minimum_length ⇒ Object (readonly)
Returns the value of attribute password_minimum_length.
1253 1254 1255 |
# File 'lib/hook0/generated/models.rb', line 1253 def password_minimum_length @password_minimum_length end |
#quota_enforcement ⇒ Object (readonly)
Returns the value of attribute quota_enforcement.
1253 1254 1255 |
# File 'lib/hook0/generated/models.rb', line 1253 def quota_enforcement @quota_enforcement end |
#registration_disabled ⇒ Object (readonly)
Returns the value of attribute registration_disabled.
1253 1254 1255 |
# File 'lib/hook0/generated/models.rb', line 1253 def registration_disabled @registration_disabled end |
#support_email_address ⇒ Object (readonly)
Returns the value of attribute support_email_address.
1253 1254 1255 |
# File 'lib/hook0/generated/models.rb', line 1253 def support_email_address @support_email_address end |
Class Method Details
.from_json(value) ⇒ InstanceConfig
Read one out of what the API answered.
1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 |
# File 'lib/hook0/generated/models.rb', line 1303 def self.from_json(value) fields = Runtime.as_fields(value, "InstanceConfig") new( application_secret_compatibility: Runtime.read(fields, "application_secret_compatibility", Runtime::BOOLEAN), auto_db_migration: Runtime.read(fields, "auto_db_migration", Runtime::BOOLEAN), biscuit_public_key: Runtime.read(fields, "biscuit_public_key", Runtime::TEXT), password_minimum_length: Runtime.read(fields, "password_minimum_length", Runtime::INTEGER), quota_enforcement: Runtime.read(fields, "quota_enforcement", Runtime::BOOLEAN), registration_disabled: Runtime.read(fields, "registration_disabled", Runtime::BOOLEAN), support_email_address: Runtime.read(fields, "support_email_address", Runtime::TEXT), cloudflare_turnstile_site_key: Runtime.maybe(fields, "cloudflare_turnstile_site_key", Runtime::TEXT), formbricks: Runtime.maybe(fields, "formbricks", InstanceConfigFormbricks.method(:from_json)), matomo: Runtime.maybe(fields, "matomo", InstanceConfigMatomo.method(:from_json)) ) end |
Instance Method Details
#==(other) ⇒ Boolean Also known as: eql?
Whether that value carries the same members as this one.
1341 1342 1343 |
# File 'lib/hook0/generated/models.rb', line 1341 def ==(other) other.is_a?(InstanceConfig) && to_h == other.to_h end |
#hash ⇒ Integer
A value two equal instances share, so that either may key a hash.
1349 1350 1351 |
# File 'lib/hook0/generated/models.rb', line 1349 def hash to_h.hash end |
#to_h ⇒ Hash{String => Object}
Write one back the way the API reads it.
1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 |
# File 'lib/hook0/generated/models.rb', line 1322 def to_h out = {} out["application_secret_compatibility"] = @application_secret_compatibility out["auto_db_migration"] = @auto_db_migration out["biscuit_public_key"] = @biscuit_public_key out["password_minimum_length"] = @password_minimum_length out["quota_enforcement"] = @quota_enforcement out["registration_disabled"] = @registration_disabled out["support_email_address"] = @support_email_address out["cloudflare_turnstile_site_key"] = @cloudflare_turnstile_site_key unless @cloudflare_turnstile_site_key.nil? out["formbricks"] = @formbricks.to_h unless @formbricks.nil? out["matomo"] = @matomo.to_h unless @matomo.nil? out end |