Class: Svix::ConnectorIn
- Inherits:
-
Object
- Object
- Svix::ConnectorIn
- Defined in:
- lib/svix/models/connector_in.rb
Instance Attribute Summary collapse
-
#allowed_event_types ⇒ Object
Returns the value of attribute allowed_event_types.
-
#description ⇒ Object
Returns the value of attribute description.
-
#feature_flags ⇒ Object
Returns the value of attribute feature_flags.
-
#instructions ⇒ Object
Returns the value of attribute instructions.
-
#kind ⇒ Object
Returns the value of attribute kind.
-
#logo ⇒ Object
Returns the value of attribute logo.
-
#name ⇒ Object
Returns the value of attribute name.
-
#product_type ⇒ Object
Returns the value of attribute product_type.
-
#transformation ⇒ Object
Returns the value of attribute transformation.
-
#uid ⇒ Object
The Connector’s UID.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ ConnectorIn
constructor
A new instance of ConnectorIn.
- #serialize ⇒ Object
-
#to_json ⇒ Object
Serializes the object to a json string.
Constructor Details
#initialize(attributes = {}) ⇒ ConnectorIn
Returns a new instance of ConnectorIn.
33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/svix/models/connector_in.rb', line 33 def initialize(attributes = {}) unless attributes.is_a?(Hash) fail(ArgumentError, "The input argument (attributes) must be a hash in `Svix::ConnectorIn` 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::ConnectorIn") end instance_variable_set("@#{k}", v) instance_variable_set("@__#{k}_is_defined", true) end end |
Instance Attribute Details
#allowed_event_types ⇒ Object
Returns the value of attribute allowed_event_types.
7 8 9 |
# File 'lib/svix/models/connector_in.rb', line 7 def allowed_event_types @allowed_event_types end |
#description ⇒ Object
Returns the value of attribute description.
8 9 10 |
# File 'lib/svix/models/connector_in.rb', line 8 def description @description end |
#feature_flags ⇒ Object
Returns the value of attribute feature_flags.
9 10 11 |
# File 'lib/svix/models/connector_in.rb', line 9 def feature_flags @feature_flags end |
#instructions ⇒ Object
Returns the value of attribute instructions.
10 11 12 |
# File 'lib/svix/models/connector_in.rb', line 10 def instructions @instructions end |
#kind ⇒ Object
Returns the value of attribute kind.
11 12 13 |
# File 'lib/svix/models/connector_in.rb', line 11 def kind @kind end |
#logo ⇒ Object
Returns the value of attribute logo.
12 13 14 |
# File 'lib/svix/models/connector_in.rb', line 12 def logo @logo end |
#name ⇒ Object
Returns the value of attribute name.
13 14 15 |
# File 'lib/svix/models/connector_in.rb', line 13 def name @name end |
#product_type ⇒ Object
Returns the value of attribute product_type.
14 15 16 |
# File 'lib/svix/models/connector_in.rb', line 14 def product_type @product_type end |
#transformation ⇒ Object
Returns the value of attribute transformation.
15 16 17 |
# File 'lib/svix/models/connector_in.rb', line 15 def transformation @transformation end |
#uid ⇒ Object
The Connector’s UID.
17 18 19 |
# File 'lib/svix/models/connector_in.rb', line 17 def uid @uid end |
Class Method Details
.deserialize(attributes = {}) ⇒ Object
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/svix/models/connector_in.rb', line 48 def self.deserialize(attributes = {}) attributes = attributes.transform_keys(&:to_s) attrs = Hash.new attrs["allowed_event_types"] = attributes["allowedEventTypes"] attrs["description"] = attributes["description"] attrs["feature_flags"] = attributes["featureFlags"] attrs["instructions"] = attributes["instructions"] attrs["kind"] = Svix::ConnectorKind.deserialize(attributes["kind"]) if attributes["kind"] attrs["logo"] = attributes["logo"] attrs["name"] = attributes["name"] if attributes["productType"] attrs["product_type"] = Svix::ConnectorProduct.deserialize(attributes["productType"]) end attrs["transformation"] = attributes["transformation"] attrs["uid"] = attributes["uid"] new(attrs) end |
Instance Method Details
#serialize ⇒ Object
67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/svix/models/connector_in.rb', line 67 def serialize out = Hash.new out["allowedEventTypes"] = Svix::serialize_primitive(@allowed_event_types) if @allowed_event_types out["description"] = Svix::serialize_primitive(@description) if @description out["featureFlags"] = Svix::serialize_primitive(@feature_flags) if @feature_flags out["instructions"] = Svix::serialize_primitive(@instructions) if @instructions out["kind"] = Svix::serialize_schema_ref(@kind) if @kind out["logo"] = Svix::serialize_primitive(@logo) if @logo out["name"] = Svix::serialize_primitive(@name) if @name out["productType"] = Svix::serialize_schema_ref(@product_type) if @product_type out["transformation"] = Svix::serialize_primitive(@transformation) if @transformation out["uid"] = Svix::serialize_primitive(@uid) if @uid out end |
#to_json ⇒ Object
Serializes the object to a json string
84 85 86 |
# File 'lib/svix/models/connector_in.rb', line 84 def to_json JSON.dump(serialize) end |