Class: Composio::ConnectionParams
- Inherits:
-
Object
- Object
- Composio::ConnectionParams
- Defined in:
- lib/composio/models/connection_params.rb
Instance Attribute Summary collapse
-
#app_name ⇒ Object
Returns the value of attribute app_name.
-
#app_unique_id ⇒ Object
Returns the value of attribute app_unique_id.
-
#auth_config ⇒ Object
Returns the value of attribute auth_config.
-
#client_unique_user_id ⇒ Object
Returns the value of attribute client_unique_user_id.
-
#connection_params ⇒ Object
Returns the value of attribute connection_params.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#data ⇒ Object
Returns the value of attribute data.
-
#deleted ⇒ Object
Returns the value of attribute deleted.
-
#enabled ⇒ Object
Returns the value of attribute enabled.
-
#id ⇒ Object
Returns the value of attribute id.
-
#integration_id ⇒ Object
Returns the value of attribute integration_id.
-
#invocation_count ⇒ Object
Returns the value of attribute invocation_count.
-
#is_disabled ⇒ Object
Returns the value of attribute is_disabled.
-
#labels ⇒ Object
Returns the value of attribute labels.
-
#logo ⇒ Object
Returns the value of attribute logo.
-
#member ⇒ Object
Returns the value of attribute member.
-
#status ⇒ Object
Returns the value of attribute status.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
Class Method Summary collapse
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ ConnectionParams
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ ConnectionParams
Initializes the object
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 |
# File 'lib/composio/models/connection_params.rb', line 111 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `Composio::ConnectionParams` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `Composio::ConnectionParams`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'integration_id') self.integration_id = attributes[:'integration_id'] end if attributes.key?(:'connection_params') self.connection_params = attributes[:'connection_params'] end if attributes.key?(:'is_disabled') self.is_disabled = attributes[:'is_disabled'] end if attributes.key?(:'invocation_count') self.invocation_count = attributes[:'invocation_count'] end if attributes.key?(:'id') self.id = attributes[:'id'] end if attributes.key?(:'client_unique_user_id') self.client_unique_user_id = attributes[:'client_unique_user_id'] end if attributes.key?(:'status') self.status = attributes[:'status'] end if attributes.key?(:'data') self.data = attributes[:'data'] end if attributes.key?(:'deleted') self.deleted = attributes[:'deleted'] end if attributes.key?(:'enabled') self.enabled = attributes[:'enabled'] end if attributes.key?(:'created_at') self.created_at = attributes[:'created_at'] end if attributes.key?(:'updated_at') self.updated_at = attributes[:'updated_at'] end if attributes.key?(:'app_unique_id') self.app_unique_id = attributes[:'app_unique_id'] end if attributes.key?(:'app_name') self.app_name = attributes[:'app_name'] end if attributes.key?(:'logo') self.logo = attributes[:'logo'] end if attributes.key?(:'auth_config') self.auth_config = attributes[:'auth_config'] end if attributes.key?(:'member') if (value = attributes[:'member']).is_a?(Array) self.member = value end end if attributes.key?(:'labels') if (value = attributes[:'labels']).is_a?(Array) self.labels = value end end end |
Instance Attribute Details
#app_name ⇒ Object
Returns the value of attribute app_name.
40 41 42 |
# File 'lib/composio/models/connection_params.rb', line 40 def app_name @app_name end |
#app_unique_id ⇒ Object
Returns the value of attribute app_unique_id.
38 39 40 |
# File 'lib/composio/models/connection_params.rb', line 38 def app_unique_id @app_unique_id end |
#auth_config ⇒ Object
Returns the value of attribute auth_config.
44 45 46 |
# File 'lib/composio/models/connection_params.rb', line 44 def auth_config @auth_config end |
#client_unique_user_id ⇒ Object
Returns the value of attribute client_unique_user_id.
24 25 26 |
# File 'lib/composio/models/connection_params.rb', line 24 def client_unique_user_id @client_unique_user_id end |
#connection_params ⇒ Object
Returns the value of attribute connection_params.
16 17 18 |
# File 'lib/composio/models/connection_params.rb', line 16 def connection_params @connection_params end |
#created_at ⇒ Object
Returns the value of attribute created_at.
34 35 36 |
# File 'lib/composio/models/connection_params.rb', line 34 def created_at @created_at end |
#data ⇒ Object
Returns the value of attribute data.
28 29 30 |
# File 'lib/composio/models/connection_params.rb', line 28 def data @data end |
#deleted ⇒ Object
Returns the value of attribute deleted.
30 31 32 |
# File 'lib/composio/models/connection_params.rb', line 30 def deleted @deleted end |
#enabled ⇒ Object
Returns the value of attribute enabled.
32 33 34 |
# File 'lib/composio/models/connection_params.rb', line 32 def enabled @enabled end |
#id ⇒ Object
Returns the value of attribute id.
22 23 24 |
# File 'lib/composio/models/connection_params.rb', line 22 def id @id end |
#integration_id ⇒ Object
Returns the value of attribute integration_id.
14 15 16 |
# File 'lib/composio/models/connection_params.rb', line 14 def integration_id @integration_id end |
#invocation_count ⇒ Object
Returns the value of attribute invocation_count.
20 21 22 |
# File 'lib/composio/models/connection_params.rb', line 20 def invocation_count @invocation_count end |
#is_disabled ⇒ Object
Returns the value of attribute is_disabled.
18 19 20 |
# File 'lib/composio/models/connection_params.rb', line 18 def is_disabled @is_disabled end |
#labels ⇒ Object
Returns the value of attribute labels.
48 49 50 |
# File 'lib/composio/models/connection_params.rb', line 48 def labels @labels end |
#logo ⇒ Object
Returns the value of attribute logo.
42 43 44 |
# File 'lib/composio/models/connection_params.rb', line 42 def logo @logo end |
#member ⇒ Object
Returns the value of attribute member.
46 47 48 |
# File 'lib/composio/models/connection_params.rb', line 46 def member @member end |
#status ⇒ Object
Returns the value of attribute status.
26 27 28 |
# File 'lib/composio/models/connection_params.rb', line 26 def status @status end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
36 37 38 |
# File 'lib/composio/models/connection_params.rb', line 36 def updated_at @updated_at end |
Class Method Details
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
75 76 77 |
# File 'lib/composio/models/connection_params.rb', line 75 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/composio/models/connection_params.rb', line 51 def self.attribute_map { :'integration_id' => :'integrationId', :'connection_params' => :'connectionParams', :'is_disabled' => :'isDisabled', :'invocation_count' => :'invocationCount', :'id' => :'id', :'client_unique_user_id' => :'clientUniqueUserId', :'status' => :'status', :'data' => :'data', :'deleted' => :'deleted', :'enabled' => :'enabled', :'created_at' => :'createdAt', :'updated_at' => :'updatedAt', :'app_unique_id' => :'appUniqueId', :'app_name' => :'appName', :'logo' => :'logo', :'auth_config' => :'authConfig', :'member' => :'member', :'labels' => :'labels' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
304 305 306 |
# File 'lib/composio/models/connection_params.rb', line 304 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
104 105 106 107 |
# File 'lib/composio/models/connection_params.rb', line 104 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/composio/models/connection_params.rb', line 80 def self.openapi_types { :'integration_id' => :'String', :'connection_params' => :'Object', :'is_disabled' => :'Boolean', :'invocation_count' => :'Float', :'id' => :'String', :'client_unique_user_id' => :'String', :'status' => :'String', :'data' => :'Object', :'deleted' => :'Boolean', :'enabled' => :'Boolean', :'created_at' => :'MemberInfoResDTOCreatedAt', :'updated_at' => :'MemberInfoResDTOCreatedAt', :'app_unique_id' => :'String', :'app_name' => :'String', :'logo' => :'String', :'auth_config' => :'Object', :'member' => :'Array<MemberInfoResDTO>', :'labels' => :'Array<String>' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 |
# File 'lib/composio/models/connection_params.rb', line 266 def ==(o) return true if self.equal?(o) self.class == o.class && integration_id == o.integration_id && connection_params == o.connection_params && is_disabled == o.is_disabled && invocation_count == o.invocation_count && id == o.id && client_unique_user_id == o.client_unique_user_id && status == o.status && data == o.data && deleted == o.deleted && enabled == o.enabled && created_at == o.created_at && updated_at == o.updated_at && app_unique_id == o.app_unique_id && app_name == o.app_name && logo == o.logo && auth_config == o.auth_config && member == o.member && labels == o.labels end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 |
# File 'lib/composio/models/connection_params.rb', line 335 def _deserialize(type, value) case type.to_sym when :Time Time.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model # models (e.g. Pet) or oneOf klass = Composio.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
406 407 408 409 410 411 412 413 414 415 416 417 418 |
# File 'lib/composio/models/connection_params.rb', line 406 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 |
# File 'lib/composio/models/connection_params.rb', line 311 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end self end |
#eql?(o) ⇒ Boolean
291 292 293 |
# File 'lib/composio/models/connection_params.rb', line 291 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
297 298 299 |
# File 'lib/composio/models/connection_params.rb', line 297 def hash [integration_id, connection_params, is_disabled, invocation_count, id, client_unique_user_id, status, data, deleted, enabled, created_at, updated_at, app_unique_id, app_name, logo, auth_config, member, labels].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 |
# File 'lib/composio/models/connection_params.rb', line 203 def list_invalid_properties invalid_properties = Array.new if @integration_id.nil? invalid_properties.push('invalid value for "integration_id", integration_id cannot be nil.') end if @is_disabled.nil? invalid_properties.push('invalid value for "is_disabled", is_disabled cannot be nil.') end if @invocation_count.nil? invalid_properties.push('invalid value for "invocation_count", invocation_count cannot be nil.') end if @id.nil? invalid_properties.push('invalid value for "id", id cannot be nil.') end if @status.nil? invalid_properties.push('invalid value for "status", status cannot be nil.') end if @created_at.nil? invalid_properties.push('invalid value for "created_at", created_at cannot be nil.') end if @updated_at.nil? invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.') end if @app_unique_id.nil? invalid_properties.push('invalid value for "app_unique_id", app_unique_id cannot be nil.') end if @app_name.nil? invalid_properties.push('invalid value for "app_name", app_name cannot be nil.') end if @member.nil? invalid_properties.push('invalid value for "member", member cannot be nil.') end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
382 383 384 |
# File 'lib/composio/models/connection_params.rb', line 382 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
388 389 390 391 392 393 394 395 396 397 398 399 400 |
# File 'lib/composio/models/connection_params.rb', line 388 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
376 377 378 |
# File 'lib/composio/models/connection_params.rb', line 376 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
250 251 252 253 254 255 256 257 258 259 260 261 262 |
# File 'lib/composio/models/connection_params.rb', line 250 def valid? return false if @integration_id.nil? return false if @is_disabled.nil? return false if @invocation_count.nil? return false if @id.nil? return false if @status.nil? return false if @created_at.nil? return false if @updated_at.nil? return false if @app_unique_id.nil? return false if @app_name.nil? return false if @member.nil? true end |