Class: Svix::SnowflakePatchConfig
- Inherits:
-
Object
- Object
- Svix::SnowflakePatchConfig
- Defined in:
- lib/svix/models/snowflake_patch_config.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#account_identifier ⇒ Object
Returns the value of attribute account_identifier.
-
#db_name ⇒ Object
Database name.
-
#private_key ⇒ Object
Returns the value of attribute private_key.
-
#schema_name ⇒ Object
Schema name.
-
#table_name ⇒ Object
Table name.
-
#user_id ⇒ Object
Returns the value of attribute user_id.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ SnowflakePatchConfig
constructor
A new instance of SnowflakePatchConfig.
- #serialize ⇒ Object
-
#to_json ⇒ Object
Serializes the object to a json string.
Constructor Details
#initialize(attributes = {}) ⇒ SnowflakePatchConfig
Returns a new instance of SnowflakePatchConfig.
26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/svix/models/snowflake_patch_config.rb', line 26 def initialize(attributes = {}) unless attributes.is_a?(Hash) fail(ArgumentError, "The input argument (attributes) must be a hash in `Svix::SnowflakePatchConfig` new method") end attributes.each do |k, v| unless ALL_FIELD.include?(k.to_s) fail(ArgumentError, "The field #{k} is not part of Svix::SnowflakePatchConfig") end instance_variable_set("@#{k}", v) instance_variable_set("@__#{k}_is_defined", true) end end |
Instance Attribute Details
#account_identifier ⇒ Object
Returns the value of attribute account_identifier.
7 8 9 |
# File 'lib/svix/models/snowflake_patch_config.rb', line 7 def account_identifier @account_identifier end |
#db_name ⇒ Object
Database name.
Only required if not using transformations.
11 12 13 |
# File 'lib/svix/models/snowflake_patch_config.rb', line 11 def db_name @db_name end |
#private_key ⇒ Object
Returns the value of attribute private_key.
12 13 14 |
# File 'lib/svix/models/snowflake_patch_config.rb', line 12 def private_key @private_key end |
#schema_name ⇒ Object
Schema name.
Only required if not using transformations.
16 17 18 |
# File 'lib/svix/models/snowflake_patch_config.rb', line 16 def schema_name @schema_name end |
#table_name ⇒ Object
Table name.
Only required if not using transformations.
20 21 22 |
# File 'lib/svix/models/snowflake_patch_config.rb', line 20 def table_name @table_name end |
#user_id ⇒ Object
Returns the value of attribute user_id.
21 22 23 |
# File 'lib/svix/models/snowflake_patch_config.rb', line 21 def user_id @user_id end |
Class Method Details
.deserialize(attributes = {}) ⇒ Object
41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/svix/models/snowflake_patch_config.rb', line 41 def self.deserialize(attributes = {}) attributes = attributes.transform_keys(&:to_s) attrs = Hash.new attrs["account_identifier"] = attributes["accountIdentifier"] attrs["db_name"] = attributes["dbName"] attrs["private_key"] = attributes["privateKey"] attrs["schema_name"] = attributes["schemaName"] attrs["table_name"] = attributes["tableName"] attrs["user_id"] = attributes["userId"] new(attrs) end |
Instance Method Details
#serialize ⇒ Object
53 54 55 56 57 58 59 60 61 62 |
# File 'lib/svix/models/snowflake_patch_config.rb', line 53 def serialize out = Hash.new out["accountIdentifier"] = Svix::serialize_primitive(@account_identifier) if @account_identifier out["dbName"] = Svix::serialize_primitive(@db_name) if @db_name out["privateKey"] = Svix::serialize_primitive(@private_key) if @private_key out["schemaName"] = Svix::serialize_primitive(@schema_name) if @schema_name out["tableName"] = Svix::serialize_primitive(@table_name) if @table_name out["userId"] = Svix::serialize_primitive(@user_id) if @user_id out end |
#to_json ⇒ Object
Serializes the object to a json string
66 67 68 |
# File 'lib/svix/models/snowflake_patch_config.rb', line 66 def to_json JSON.dump(serialize) end |