Class: Svix::EventBridgeConfigOut
- Inherits:
-
Object
- Object
- Svix::EventBridgeConfigOut
- Defined in:
- lib/svix/models/event_bridge_config_out.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#access_key_id ⇒ Object
Returns the value of attribute access_key_id.
-
#detail_type ⇒ Object
Returns the value of attribute detail_type.
-
#event_bus_name ⇒ Object
Returns the value of attribute event_bus_name.
-
#region ⇒ Object
Returns the value of attribute region.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ EventBridgeConfigOut
constructor
A new instance of EventBridgeConfigOut.
- #serialize ⇒ Object
-
#to_json ⇒ Object
Serializes the object to a json string.
Constructor Details
#initialize(attributes = {}) ⇒ EventBridgeConfigOut
Returns a new instance of EventBridgeConfigOut.
15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/svix/models/event_bridge_config_out.rb', line 15 def initialize(attributes = {}) unless attributes.is_a?(Hash) fail(ArgumentError, "The input argument (attributes) must be a hash in `Svix::EventBridgeConfigOut` 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::EventBridgeConfigOut") 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.
9 10 11 |
# File 'lib/svix/models/event_bridge_config_out.rb', line 9 def access_key_id @access_key_id end |
#detail_type ⇒ Object
Returns the value of attribute detail_type.
8 9 10 |
# File 'lib/svix/models/event_bridge_config_out.rb', line 8 def detail_type @detail_type end |
#event_bus_name ⇒ Object
Returns the value of attribute event_bus_name.
7 8 9 |
# File 'lib/svix/models/event_bridge_config_out.rb', line 7 def event_bus_name @event_bus_name end |
#region ⇒ Object
Returns the value of attribute region.
10 11 12 |
# File 'lib/svix/models/event_bridge_config_out.rb', line 10 def region @region end |
Class Method Details
.deserialize(attributes = {}) ⇒ Object
30 31 32 33 34 35 36 37 38 |
# File 'lib/svix/models/event_bridge_config_out.rb', line 30 def self.deserialize(attributes = {}) attributes = attributes.transform_keys(&:to_s) attrs = Hash.new attrs["event_bus_name"] = attributes["eventBusName"] attrs["detail_type"] = attributes["detailType"] attrs["access_key_id"] = attributes["accessKeyId"] attrs["region"] = attributes["region"] new(attrs) end |
Instance Method Details
#serialize ⇒ Object
40 41 42 43 44 45 46 47 |
# File 'lib/svix/models/event_bridge_config_out.rb', line 40 def serialize out = Hash.new out["eventBusName"] = Svix::serialize_primitive(@event_bus_name) if @event_bus_name out["detailType"] = Svix::serialize_primitive(@detail_type) if @detail_type out["accessKeyId"] = Svix::serialize_primitive(@access_key_id) if @access_key_id out["region"] = Svix::serialize_primitive(@region) if @region out end |
#to_json ⇒ Object
Serializes the object to a json string
51 52 53 |
# File 'lib/svix/models/event_bridge_config_out.rb', line 51 def to_json JSON.dump(serialize) end |