Class: Svix::SnowflakeConfigOut
- Inherits:
-
Object
- Object
- Svix::SnowflakeConfigOut
- Defined in:
- lib/svix/models/snowflake_config_out.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#account_identifier ⇒ Object
Returns the value of attribute account_identifier.
-
#db_name ⇒ Object
Database name.
-
#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 = {}) ⇒ SnowflakeConfigOut
constructor
A new instance of SnowflakeConfigOut.
- #serialize ⇒ Object
-
#to_json ⇒ Object
Serializes the object to a json string.
Constructor Details
#initialize(attributes = {}) ⇒ SnowflakeConfigOut
Returns a new instance of SnowflakeConfigOut.
25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/svix/models/snowflake_config_out.rb', line 25 def initialize(attributes = {}) unless attributes.is_a?(Hash) fail(ArgumentError, "The input argument (attributes) must be a hash in `Svix::SnowflakeConfigOut` 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::SnowflakeConfigOut") 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_config_out.rb', line 7 def account_identifier @account_identifier end |
#db_name ⇒ Object
Database name.
Only required if not using transformations.
12 13 14 |
# File 'lib/svix/models/snowflake_config_out.rb', line 12 def db_name @db_name end |
#schema_name ⇒ Object
Schema name.
Only required if not using transformations.
16 17 18 |
# File 'lib/svix/models/snowflake_config_out.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_config_out.rb', line 20 def table_name @table_name end |
#user_id ⇒ Object
Returns the value of attribute user_id.
8 9 10 |
# File 'lib/svix/models/snowflake_config_out.rb', line 8 def user_id @user_id end |
Class Method Details
.deserialize(attributes = {}) ⇒ Object
40 41 42 43 44 45 46 47 48 49 |
# File 'lib/svix/models/snowflake_config_out.rb', line 40 def self.deserialize(attributes = {}) attributes = attributes.transform_keys(&:to_s) attrs = Hash.new attrs["account_identifier"] = attributes["accountIdentifier"] attrs["user_id"] = attributes["userId"] attrs["db_name"] = attributes["dbName"] attrs["schema_name"] = attributes["schemaName"] attrs["table_name"] = attributes["tableName"] new(attrs) end |
Instance Method Details
#serialize ⇒ Object
51 52 53 54 55 56 57 58 59 |
# File 'lib/svix/models/snowflake_config_out.rb', line 51 def serialize out = Hash.new out["accountIdentifier"] = Svix::serialize_primitive(@account_identifier) if @account_identifier out["userId"] = Svix::serialize_primitive(@user_id) if @user_id out["dbName"] = Svix::serialize_primitive(@db_name) if @db_name out["schemaName"] = Svix::serialize_primitive(@schema_name) if @schema_name out["tableName"] = Svix::serialize_primitive(@table_name) if @table_name out end |
#to_json ⇒ Object
Serializes the object to a json string
63 64 65 |
# File 'lib/svix/models/snowflake_config_out.rb', line 63 def to_json JSON.dump(serialize) end |