Class: Svix::RedshiftPatchConfig
- Inherits:
-
Object
- Object
- Svix::RedshiftPatchConfig
- Defined in:
- lib/svix/models/redshift_patch_config.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#access_key_id ⇒ Object
Returns the value of attribute access_key_id.
-
#db_name ⇒ Object
Database name.
-
#region ⇒ Object
Returns the value of attribute region.
-
#schema_name ⇒ Object
Schema name.
-
#secret_access_key ⇒ Object
Returns the value of attribute secret_access_key.
-
#table_name ⇒ Object
Table name.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ RedshiftPatchConfig
constructor
A new instance of RedshiftPatchConfig.
- #serialize ⇒ Object
-
#to_json ⇒ Object
Serializes the object to a json string.
Constructor Details
#initialize(attributes = {}) ⇒ RedshiftPatchConfig
Returns a new instance of RedshiftPatchConfig.
26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/svix/models/redshift_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::RedshiftPatchConfig` 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::RedshiftPatchConfig") 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_patch_config.rb', line 7 def access_key_id @access_key_id end |
#db_name ⇒ Object
Database name.
Only required if not using transformations.
11 12 13 |
# File 'lib/svix/models/redshift_patch_config.rb', line 11 def db_name @db_name end |
#region ⇒ Object
Returns the value of attribute region.
12 13 14 |
# File 'lib/svix/models/redshift_patch_config.rb', line 12 def region @region end |
#schema_name ⇒ Object
Schema name.
Only used if not using transformations.
16 17 18 |
# File 'lib/svix/models/redshift_patch_config.rb', line 16 def schema_name @schema_name end |
#secret_access_key ⇒ Object
Returns the value of attribute secret_access_key.
17 18 19 |
# File 'lib/svix/models/redshift_patch_config.rb', line 17 def secret_access_key @secret_access_key end |
#table_name ⇒ Object
Table name.
Only required if not using transformations.
21 22 23 |
# File 'lib/svix/models/redshift_patch_config.rb', line 21 def table_name @table_name end |
Class Method Details
.deserialize(attributes = {}) ⇒ Object
41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/svix/models/redshift_patch_config.rb', line 41 def self.deserialize(attributes = {}) attributes = attributes.transform_keys(&:to_s) attrs = Hash.new attrs["access_key_id"] = attributes["accessKeyId"] attrs["db_name"] = attributes["dbName"] attrs["region"] = attributes["region"] attrs["schema_name"] = attributes["schemaName"] attrs["secret_access_key"] = attributes["secretAccessKey"] attrs["table_name"] = attributes["tableName"] new(attrs) end |
Instance Method Details
#serialize ⇒ Object
53 54 55 56 57 58 59 60 61 62 |
# File 'lib/svix/models/redshift_patch_config.rb', line 53 def serialize out = Hash.new out["accessKeyId"] = Svix::serialize_primitive(@access_key_id) if @access_key_id out["dbName"] = Svix::serialize_primitive(@db_name) if @db_name out["region"] = Svix::serialize_primitive(@region) if @region out["schemaName"] = Svix::serialize_primitive(@schema_name) if @schema_name out["secretAccessKey"] = Svix::serialize_primitive(@secret_access_key) if @secret_access_key out["tableName"] = Svix::serialize_primitive(@table_name) if @table_name out end |
#to_json ⇒ Object
Serializes the object to a json string
66 67 68 |
# File 'lib/svix/models/redshift_patch_config.rb', line 66 def to_json JSON.dump(serialize) end |