Class: Svix::EventTypeFromOpenApi
- Inherits:
-
Object
- Object
- Svix::EventTypeFromOpenApi
- Defined in:
- lib/svix/models/event_type_from_open_api.rb
Instance Attribute Summary collapse
-
#deprecated ⇒ Object
Returns the value of attribute deprecated.
-
#description ⇒ Object
Returns the value of attribute description.
-
#feature_flag ⇒ Object
Returns the value of attribute feature_flag.
-
#feature_flags ⇒ Object
Returns the value of attribute feature_flags.
-
#group_name ⇒ Object
The event type group’s name.
-
#name ⇒ Object
The event type’s name.
-
#schemas ⇒ Object
Returns the value of attribute schemas.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ EventTypeFromOpenApi
constructor
A new instance of EventTypeFromOpenApi.
- #serialize ⇒ Object
-
#to_json ⇒ Object
Serializes the object to a json string.
Constructor Details
#initialize(attributes = {}) ⇒ EventTypeFromOpenApi
Returns a new instance of EventTypeFromOpenApi.
20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/svix/models/event_type_from_open_api.rb', line 20 def initialize(attributes = {}) unless attributes.is_a?(Hash) fail(ArgumentError, "The input argument (attributes) must be a hash in `Svix::EventTypeFromOpenApi` 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::EventTypeFromOpenApi") end instance_variable_set("@#{k}", v) instance_variable_set("@__#{k}_is_defined", true) end end |
Instance Attribute Details
#deprecated ⇒ Object
Returns the value of attribute deprecated.
7 8 9 |
# File 'lib/svix/models/event_type_from_open_api.rb', line 7 def deprecated @deprecated end |
#description ⇒ Object
Returns the value of attribute description.
8 9 10 |
# File 'lib/svix/models/event_type_from_open_api.rb', line 8 def description @description end |
#feature_flag ⇒ Object
Returns the value of attribute feature_flag.
9 10 11 |
# File 'lib/svix/models/event_type_from_open_api.rb', line 9 def feature_flag @feature_flag end |
#feature_flags ⇒ Object
Returns the value of attribute feature_flags.
10 11 12 |
# File 'lib/svix/models/event_type_from_open_api.rb', line 10 def feature_flags @feature_flags end |
#group_name ⇒ Object
The event type group’s name
12 13 14 |
# File 'lib/svix/models/event_type_from_open_api.rb', line 12 def group_name @group_name end |
#name ⇒ Object
The event type’s name
14 15 16 |
# File 'lib/svix/models/event_type_from_open_api.rb', line 14 def name @name end |
#schemas ⇒ Object
Returns the value of attribute schemas.
15 16 17 |
# File 'lib/svix/models/event_type_from_open_api.rb', line 15 def schemas @schemas end |
Class Method Details
.deserialize(attributes = {}) ⇒ Object
35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/svix/models/event_type_from_open_api.rb', line 35 def self.deserialize(attributes = {}) attributes = attributes.transform_keys(&:to_s) attrs = Hash.new attrs["deprecated"] = attributes["deprecated"] attrs["description"] = attributes["description"] attrs["feature_flag"] = attributes["featureFlag"] attrs["feature_flags"] = attributes["featureFlags"] attrs["group_name"] = attributes["groupName"] attrs["name"] = attributes["name"] attrs["schemas"] = attributes["schemas"] new(attrs) end |
Instance Method Details
#serialize ⇒ Object
48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/svix/models/event_type_from_open_api.rb', line 48 def serialize out = Hash.new out["deprecated"] = Svix::serialize_primitive(@deprecated) if @deprecated out["description"] = Svix::serialize_primitive(@description) if @description out["featureFlag"] = Svix::serialize_primitive(@feature_flag) if @feature_flag out["featureFlags"] = Svix::serialize_primitive(@feature_flags) if @feature_flags out["groupName"] = Svix::serialize_primitive(@group_name) if @group_name out["name"] = Svix::serialize_primitive(@name) if @name out["schemas"] = Svix::serialize_primitive(@schemas) if @schemas out end |
#to_json ⇒ Object
Serializes the object to a json string
62 63 64 |
# File 'lib/svix/models/event_type_from_open_api.rb', line 62 def to_json JSON.dump(serialize) end |