Class: Svix::ConnectorPatch
- Inherits:
-
Object
- Object
- Svix::ConnectorPatch
- Defined in:
- lib/svix/models/connector_patch.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.
-
#transformation ⇒ Object
Returns the value of attribute transformation.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ ConnectorPatch
constructor
A new instance of ConnectorPatch.
- #serialize ⇒ Object
-
#to_json ⇒ Object
Serializes the object to a json string.
Constructor Details
#initialize(attributes = {}) ⇒ ConnectorPatch
Returns a new instance of ConnectorPatch.
28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/svix/models/connector_patch.rb', line 28 def initialize(attributes = {}) unless attributes.is_a?(Hash) fail(ArgumentError, "The input argument (attributes) must be a hash in `Svix::ConnectorPatch` 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::ConnectorPatch") 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_patch.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_patch.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_patch.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_patch.rb', line 10 def instructions @instructions end |
#kind ⇒ Object
Returns the value of attribute kind.
11 12 13 |
# File 'lib/svix/models/connector_patch.rb', line 11 def kind @kind end |
#logo ⇒ Object
Returns the value of attribute logo.
12 13 14 |
# File 'lib/svix/models/connector_patch.rb', line 12 def logo @logo end |
#name ⇒ Object
Returns the value of attribute name.
13 14 15 |
# File 'lib/svix/models/connector_patch.rb', line 13 def name @name end |
#transformation ⇒ Object
Returns the value of attribute transformation.
14 15 16 |
# File 'lib/svix/models/connector_patch.rb', line 14 def transformation @transformation end |
Class Method Details
.deserialize(attributes = {}) ⇒ Object
43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/svix/models/connector_patch.rb', line 43 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"] attrs["transformation"] = attributes["transformation"] new(attrs) end |
Instance Method Details
#serialize ⇒ Object
57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/svix/models/connector_patch.rb', line 57 def serialize out = Hash.new out["allowedEventTypes"] = Svix::serialize_primitive(@allowed_event_types) if @__allowed_event_types_is_defined out["description"] = Svix::serialize_primitive(@description) if @description out["featureFlags"] = Svix::serialize_primitive(@feature_flags) if @__feature_flags_is_defined 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_is_defined out["name"] = Svix::serialize_primitive(@name) if @name out["transformation"] = Svix::serialize_primitive(@transformation) if @transformation out end |
#to_json ⇒ Object
Serializes the object to a json string
72 73 74 |
# File 'lib/svix/models/connector_patch.rb', line 72 def to_json JSON.dump(serialize) end |