Class: Svix::RedshiftConfigOut
- Inherits:
-
Object
- Object
- Svix::RedshiftConfigOut
- Defined in:
- lib/svix/models/redshift_config_out.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#access_key_id ⇒ Object
Returns the value of attribute access_key_id.
-
#cluster_identifier ⇒ Object
Returns the value of attribute cluster_identifier.
-
#db_name ⇒ Object
Database name.
-
#db_user ⇒ Object
Returns the value of attribute db_user.
-
#region ⇒ Object
Returns the value of attribute region.
-
#schema_name ⇒ Object
Schema name.
-
#table_name ⇒ Object
Table name.
-
#workgroup_name ⇒ Object
Returns the value of attribute workgroup_name.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ RedshiftConfigOut
constructor
A new instance of RedshiftConfigOut.
- #serialize ⇒ Object
-
#to_json ⇒ Object
Serializes the object to a json string.
Constructor Details
#initialize(attributes = {}) ⇒ RedshiftConfigOut
Returns a new instance of RedshiftConfigOut.
37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/svix/models/redshift_config_out.rb', line 37 def initialize(attributes = {}) unless attributes.is_a?(Hash) fail(ArgumentError, "The input argument (attributes) must be a hash in `Svix::RedshiftConfigOut` 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::RedshiftConfigOut") end instance_variable_set("@#{k}", v) instance_variable_set("@__#{k}_is_defined", true) end end |
Instance Attribute Details
#access_key_id ⇒ Object
Returns the value of attribute access_key_id.
7 8 9 |
# File 'lib/svix/models/redshift_config_out.rb', line 7 def access_key_id @access_key_id end |
#cluster_identifier ⇒ Object
Returns the value of attribute cluster_identifier.
9 10 11 |
# File 'lib/svix/models/redshift_config_out.rb', line 9 def cluster_identifier @cluster_identifier end |
#db_name ⇒ Object
Database name.
Only required if not using transformations.
15 16 17 |
# File 'lib/svix/models/redshift_config_out.rb', line 15 def db_name @db_name end |
#db_user ⇒ Object
Returns the value of attribute db_user.
10 11 12 |
# File 'lib/svix/models/redshift_config_out.rb', line 10 def db_user @db_user end |
#region ⇒ Object
Returns the value of attribute region.
8 9 10 |
# File 'lib/svix/models/redshift_config_out.rb', line 8 def region @region end |
#schema_name ⇒ Object
Schema name.
Only used if not using transformations.
19 20 21 |
# File 'lib/svix/models/redshift_config_out.rb', line 19 def schema_name @schema_name end |
#table_name ⇒ Object
Table name.
Only required if not using transformations.
23 24 25 |
# File 'lib/svix/models/redshift_config_out.rb', line 23 def table_name @table_name end |
#workgroup_name ⇒ Object
Returns the value of attribute workgroup_name.
11 12 13 |
# File 'lib/svix/models/redshift_config_out.rb', line 11 def workgroup_name @workgroup_name end |
Class Method Details
.deserialize(attributes = {}) ⇒ Object
52 53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/svix/models/redshift_config_out.rb', line 52 def self.deserialize(attributes = {}) attributes = attributes.transform_keys(&:to_s) attrs = Hash.new attrs["access_key_id"] = attributes["accessKeyId"] attrs["region"] = attributes["region"] attrs["cluster_identifier"] = attributes["clusterIdentifier"] attrs["db_user"] = attributes["dbUser"] attrs["workgroup_name"] = attributes["workgroupName"] attrs["db_name"] = attributes["dbName"] attrs["schema_name"] = attributes["schemaName"] attrs["table_name"] = attributes["tableName"] new(attrs) end |
Instance Method Details
#serialize ⇒ Object
66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/svix/models/redshift_config_out.rb', line 66 def serialize out = Hash.new out["accessKeyId"] = Svix::serialize_primitive(@access_key_id) if @access_key_id out["region"] = Svix::serialize_primitive(@region) if @region out["clusterIdentifier"] = Svix::serialize_primitive(@cluster_identifier) if @cluster_identifier out["dbUser"] = Svix::serialize_primitive(@db_user) if @db_user out["workgroupName"] = Svix::serialize_primitive(@workgroup_name) if @workgroup_name 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
81 82 83 |
# File 'lib/svix/models/redshift_config_out.rb', line 81 def to_json JSON.dump(serialize) end |