Class: Svix::GoogleCloudStoragePatchConfig
- Inherits:
-
Object
- Object
- Svix::GoogleCloudStoragePatchConfig
- Defined in:
- lib/svix/models/google_cloud_storage_patch_config.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#bucket ⇒ Object
Returns the value of attribute bucket.
-
#credentials ⇒ Object
Returns the value of attribute credentials.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ GoogleCloudStoragePatchConfig
constructor
A new instance of GoogleCloudStoragePatchConfig.
- #serialize ⇒ Object
-
#to_json ⇒ Object
Serializes the object to a json string.
Constructor Details
#initialize(attributes = {}) ⇒ GoogleCloudStoragePatchConfig
Returns a new instance of GoogleCloudStoragePatchConfig.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/svix/models/google_cloud_storage_patch_config.rb', line 13 def initialize(attributes = {}) unless attributes.is_a?(Hash) fail( ArgumentError, "The input argument (attributes) must be a hash in `Svix::GoogleCloudStoragePatchConfig` 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::GoogleCloudStoragePatchConfig") end instance_variable_set("@#{k}", v) instance_variable_set("@__#{k}_is_defined", true) end end |
Instance Attribute Details
#bucket ⇒ Object
Returns the value of attribute bucket.
7 8 9 |
# File 'lib/svix/models/google_cloud_storage_patch_config.rb', line 7 def bucket @bucket end |
#credentials ⇒ Object
Returns the value of attribute credentials.
8 9 10 |
# File 'lib/svix/models/google_cloud_storage_patch_config.rb', line 8 def credentials @credentials end |
Class Method Details
.deserialize(attributes = {}) ⇒ Object
31 32 33 34 35 36 37 |
# File 'lib/svix/models/google_cloud_storage_patch_config.rb', line 31 def self.deserialize(attributes = {}) attributes = attributes.transform_keys(&:to_s) attrs = Hash.new attrs["bucket"] = attributes["bucket"] attrs["credentials"] = attributes["credentials"] new(attrs) end |
Instance Method Details
#serialize ⇒ Object
39 40 41 42 43 44 |
# File 'lib/svix/models/google_cloud_storage_patch_config.rb', line 39 def serialize out = Hash.new out["bucket"] = Svix::serialize_primitive(@bucket) if @bucket out["credentials"] = Svix::serialize_primitive(@credentials) if @credentials out end |
#to_json ⇒ Object
Serializes the object to a json string
48 49 50 |
# File 'lib/svix/models/google_cloud_storage_patch_config.rb', line 48 def to_json JSON.dump(serialize) end |