Class: SwaggerAemOsgiClient::OrgApacheSlingDatasourceDataSourceFactoryProperties

Inherits:
Object
  • Object
show all
Defined in:
lib/swagger_aem_osgi/models/org_apache_sling_datasource_data_source_factory_properties.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ OrgApacheSlingDatasourceDataSourceFactoryProperties

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



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
200
201
202
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
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
# File 'lib/swagger_aem_osgi/models/org_apache_sling_datasource_data_source_factory_properties.rb', line 147

def initialize(attributes = {})
  return unless attributes.is_a?(Hash)

  # convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }

  if attributes.has_key?(:'datasource.name')
    self.datasource_name = attributes[:'datasource.name']
  end

  if attributes.has_key?(:'datasource.svc.prop.name')
    self.datasource_svc_prop_name = attributes[:'datasource.svc.prop.name']
  end

  if attributes.has_key?(:'driverClassName')
    self.driver_class_name = attributes[:'driverClassName']
  end

  if attributes.has_key?(:'url')
    self.url = attributes[:'url']
  end

  if attributes.has_key?(:'username')
    self.username = attributes[:'username']
  end

  if attributes.has_key?(:'password')
    self.password = attributes[:'password']
  end

  if attributes.has_key?(:'defaultAutoCommit')
    self.default_auto_commit = attributes[:'defaultAutoCommit']
  end

  if attributes.has_key?(:'defaultReadOnly')
    self.default_read_only = attributes[:'defaultReadOnly']
  end

  if attributes.has_key?(:'defaultTransactionIsolation')
    self.default_transaction_isolation = attributes[:'defaultTransactionIsolation']
  end

  if attributes.has_key?(:'defaultCatalog')
    self.default_catalog = attributes[:'defaultCatalog']
  end

  if attributes.has_key?(:'maxActive')
    self.max_active = attributes[:'maxActive']
  end

  if attributes.has_key?(:'maxIdle')
    self.max_idle = attributes[:'maxIdle']
  end

  if attributes.has_key?(:'minIdle')
    self.min_idle = attributes[:'minIdle']
  end

  if attributes.has_key?(:'initialSize')
    self.initial_size = attributes[:'initialSize']
  end

  if attributes.has_key?(:'maxWait')
    self.max_wait = attributes[:'maxWait']
  end

  if attributes.has_key?(:'maxAge')
    self.max_age = attributes[:'maxAge']
  end

  if attributes.has_key?(:'testOnBorrow')
    self.test_on_borrow = attributes[:'testOnBorrow']
  end

  if attributes.has_key?(:'testOnReturn')
    self.test_on_return = attributes[:'testOnReturn']
  end

  if attributes.has_key?(:'testWhileIdle')
    self.test_while_idle = attributes[:'testWhileIdle']
  end

  if attributes.has_key?(:'validationQuery')
    self.validation_query = attributes[:'validationQuery']
  end

  if attributes.has_key?(:'validationQueryTimeout')
    self.validation_query_timeout = attributes[:'validationQueryTimeout']
  end

  if attributes.has_key?(:'timeBetweenEvictionRunsMillis')
    self.time_between_eviction_runs_millis = attributes[:'timeBetweenEvictionRunsMillis']
  end

  if attributes.has_key?(:'minEvictableIdleTimeMillis')
    self.min_evictable_idle_time_millis = attributes[:'minEvictableIdleTimeMillis']
  end

  if attributes.has_key?(:'connectionProperties')
    self.connection_properties = attributes[:'connectionProperties']
  end

  if attributes.has_key?(:'initSQL')
    self.init_sql = attributes[:'initSQL']
  end

  if attributes.has_key?(:'jdbcInterceptors')
    self.jdbc_interceptors = attributes[:'jdbcInterceptors']
  end

  if attributes.has_key?(:'validationInterval')
    self.validation_interval = attributes[:'validationInterval']
  end

  if attributes.has_key?(:'logValidationErrors')
    self.log_validation_errors = attributes[:'logValidationErrors']
  end

  if attributes.has_key?(:'datasource.svc.properties')
    self.datasource_svc_properties = attributes[:'datasource.svc.properties']
  end
end

Instance Attribute Details

#connection_propertiesObject

Returns the value of attribute connection_properties.



63
64
65
# File 'lib/swagger_aem_osgi/models/org_apache_sling_datasource_data_source_factory_properties.rb', line 63

def connection_properties
  @connection_properties
end

#datasource_nameObject

Returns the value of attribute datasource_name.



17
18
19
# File 'lib/swagger_aem_osgi/models/org_apache_sling_datasource_data_source_factory_properties.rb', line 17

def datasource_name
  @datasource_name
end

#datasource_svc_prop_nameObject

Returns the value of attribute datasource_svc_prop_name.



19
20
21
# File 'lib/swagger_aem_osgi/models/org_apache_sling_datasource_data_source_factory_properties.rb', line 19

def datasource_svc_prop_name
  @datasource_svc_prop_name
end

#datasource_svc_propertiesObject

Returns the value of attribute datasource_svc_properties.



73
74
75
# File 'lib/swagger_aem_osgi/models/org_apache_sling_datasource_data_source_factory_properties.rb', line 73

def datasource_svc_properties
  @datasource_svc_properties
end

#default_auto_commitObject

Returns the value of attribute default_auto_commit.



29
30
31
# File 'lib/swagger_aem_osgi/models/org_apache_sling_datasource_data_source_factory_properties.rb', line 29

def default_auto_commit
  @default_auto_commit
end

#default_catalogObject

Returns the value of attribute default_catalog.



35
36
37
# File 'lib/swagger_aem_osgi/models/org_apache_sling_datasource_data_source_factory_properties.rb', line 35

def default_catalog
  @default_catalog
end

#default_read_onlyObject

Returns the value of attribute default_read_only.



31
32
33
# File 'lib/swagger_aem_osgi/models/org_apache_sling_datasource_data_source_factory_properties.rb', line 31

def default_read_only
  @default_read_only
end

#default_transaction_isolationObject

Returns the value of attribute default_transaction_isolation.



33
34
35
# File 'lib/swagger_aem_osgi/models/org_apache_sling_datasource_data_source_factory_properties.rb', line 33

def default_transaction_isolation
  @default_transaction_isolation
end

#driver_class_nameObject

Returns the value of attribute driver_class_name.



21
22
23
# File 'lib/swagger_aem_osgi/models/org_apache_sling_datasource_data_source_factory_properties.rb', line 21

def driver_class_name
  @driver_class_name
end

#init_sqlObject

Returns the value of attribute init_sql.



65
66
67
# File 'lib/swagger_aem_osgi/models/org_apache_sling_datasource_data_source_factory_properties.rb', line 65

def init_sql
  @init_sql
end

#initial_sizeObject

Returns the value of attribute initial_size.



43
44
45
# File 'lib/swagger_aem_osgi/models/org_apache_sling_datasource_data_source_factory_properties.rb', line 43

def initial_size
  @initial_size
end

#jdbc_interceptorsObject

Returns the value of attribute jdbc_interceptors.



67
68
69
# File 'lib/swagger_aem_osgi/models/org_apache_sling_datasource_data_source_factory_properties.rb', line 67

def jdbc_interceptors
  @jdbc_interceptors
end

#log_validation_errorsObject

Returns the value of attribute log_validation_errors.



71
72
73
# File 'lib/swagger_aem_osgi/models/org_apache_sling_datasource_data_source_factory_properties.rb', line 71

def log_validation_errors
  @log_validation_errors
end

#max_activeObject

Returns the value of attribute max_active.



37
38
39
# File 'lib/swagger_aem_osgi/models/org_apache_sling_datasource_data_source_factory_properties.rb', line 37

def max_active
  @max_active
end

#max_ageObject

Returns the value of attribute max_age.



47
48
49
# File 'lib/swagger_aem_osgi/models/org_apache_sling_datasource_data_source_factory_properties.rb', line 47

def max_age
  @max_age
end

#max_idleObject

Returns the value of attribute max_idle.



39
40
41
# File 'lib/swagger_aem_osgi/models/org_apache_sling_datasource_data_source_factory_properties.rb', line 39

def max_idle
  @max_idle
end

#max_waitObject

Returns the value of attribute max_wait.



45
46
47
# File 'lib/swagger_aem_osgi/models/org_apache_sling_datasource_data_source_factory_properties.rb', line 45

def max_wait
  @max_wait
end

#min_evictable_idle_time_millisObject

Returns the value of attribute min_evictable_idle_time_millis.



61
62
63
# File 'lib/swagger_aem_osgi/models/org_apache_sling_datasource_data_source_factory_properties.rb', line 61

def min_evictable_idle_time_millis
  @min_evictable_idle_time_millis
end

#min_idleObject

Returns the value of attribute min_idle.



41
42
43
# File 'lib/swagger_aem_osgi/models/org_apache_sling_datasource_data_source_factory_properties.rb', line 41

def min_idle
  @min_idle
end

#passwordObject

Returns the value of attribute password.



27
28
29
# File 'lib/swagger_aem_osgi/models/org_apache_sling_datasource_data_source_factory_properties.rb', line 27

def password
  @password
end

#test_on_borrowObject

Returns the value of attribute test_on_borrow.



49
50
51
# File 'lib/swagger_aem_osgi/models/org_apache_sling_datasource_data_source_factory_properties.rb', line 49

def test_on_borrow
  @test_on_borrow
end

#test_on_returnObject

Returns the value of attribute test_on_return.



51
52
53
# File 'lib/swagger_aem_osgi/models/org_apache_sling_datasource_data_source_factory_properties.rb', line 51

def test_on_return
  @test_on_return
end

#test_while_idleObject

Returns the value of attribute test_while_idle.



53
54
55
# File 'lib/swagger_aem_osgi/models/org_apache_sling_datasource_data_source_factory_properties.rb', line 53

def test_while_idle
  @test_while_idle
end

#time_between_eviction_runs_millisObject

Returns the value of attribute time_between_eviction_runs_millis.



59
60
61
# File 'lib/swagger_aem_osgi/models/org_apache_sling_datasource_data_source_factory_properties.rb', line 59

def time_between_eviction_runs_millis
  @time_between_eviction_runs_millis
end

#urlObject

Returns the value of attribute url.



23
24
25
# File 'lib/swagger_aem_osgi/models/org_apache_sling_datasource_data_source_factory_properties.rb', line 23

def url
  @url
end

#usernameObject

Returns the value of attribute username.



25
26
27
# File 'lib/swagger_aem_osgi/models/org_apache_sling_datasource_data_source_factory_properties.rb', line 25

def username
  @username
end

#validation_intervalObject

Returns the value of attribute validation_interval.



69
70
71
# File 'lib/swagger_aem_osgi/models/org_apache_sling_datasource_data_source_factory_properties.rb', line 69

def validation_interval
  @validation_interval
end

#validation_queryObject

Returns the value of attribute validation_query.



55
56
57
# File 'lib/swagger_aem_osgi/models/org_apache_sling_datasource_data_source_factory_properties.rb', line 55

def validation_query
  @validation_query
end

#validation_query_timeoutObject

Returns the value of attribute validation_query_timeout.



57
58
59
# File 'lib/swagger_aem_osgi/models/org_apache_sling_datasource_data_source_factory_properties.rb', line 57

def validation_query_timeout
  @validation_query_timeout
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
# File 'lib/swagger_aem_osgi/models/org_apache_sling_datasource_data_source_factory_properties.rb', line 76

def self.attribute_map
  {
    :'datasource_name' => :'datasource.name',
    :'datasource_svc_prop_name' => :'datasource.svc.prop.name',
    :'driver_class_name' => :'driverClassName',
    :'url' => :'url',
    :'username' => :'username',
    :'password' => :'password',
    :'default_auto_commit' => :'defaultAutoCommit',
    :'default_read_only' => :'defaultReadOnly',
    :'default_transaction_isolation' => :'defaultTransactionIsolation',
    :'default_catalog' => :'defaultCatalog',
    :'max_active' => :'maxActive',
    :'max_idle' => :'maxIdle',
    :'min_idle' => :'minIdle',
    :'initial_size' => :'initialSize',
    :'max_wait' => :'maxWait',
    :'max_age' => :'maxAge',
    :'test_on_borrow' => :'testOnBorrow',
    :'test_on_return' => :'testOnReturn',
    :'test_while_idle' => :'testWhileIdle',
    :'validation_query' => :'validationQuery',
    :'validation_query_timeout' => :'validationQueryTimeout',
    :'time_between_eviction_runs_millis' => :'timeBetweenEvictionRunsMillis',
    :'min_evictable_idle_time_millis' => :'minEvictableIdleTimeMillis',
    :'connection_properties' => :'connectionProperties',
    :'init_sql' => :'initSQL',
    :'jdbc_interceptors' => :'jdbcInterceptors',
    :'validation_interval' => :'validationInterval',
    :'log_validation_errors' => :'logValidationErrors',
    :'datasource_svc_properties' => :'datasource.svc.properties'
  }
end

.openapi_typesObject

Attribute type mapping.



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
# File 'lib/swagger_aem_osgi/models/org_apache_sling_datasource_data_source_factory_properties.rb', line 111

def self.openapi_types
  {
    :'datasource_name' => :'ConfigNodePropertyString',
    :'datasource_svc_prop_name' => :'ConfigNodePropertyString',
    :'driver_class_name' => :'ConfigNodePropertyString',
    :'url' => :'ConfigNodePropertyString',
    :'username' => :'ConfigNodePropertyString',
    :'password' => :'ConfigNodePropertyString',
    :'default_auto_commit' => :'ConfigNodePropertyDropDown',
    :'default_read_only' => :'ConfigNodePropertyDropDown',
    :'default_transaction_isolation' => :'ConfigNodePropertyDropDown',
    :'default_catalog' => :'ConfigNodePropertyString',
    :'max_active' => :'ConfigNodePropertyInteger',
    :'max_idle' => :'ConfigNodePropertyInteger',
    :'min_idle' => :'ConfigNodePropertyInteger',
    :'initial_size' => :'ConfigNodePropertyInteger',
    :'max_wait' => :'ConfigNodePropertyInteger',
    :'max_age' => :'ConfigNodePropertyInteger',
    :'test_on_borrow' => :'ConfigNodePropertyBoolean',
    :'test_on_return' => :'ConfigNodePropertyBoolean',
    :'test_while_idle' => :'ConfigNodePropertyBoolean',
    :'validation_query' => :'ConfigNodePropertyString',
    :'validation_query_timeout' => :'ConfigNodePropertyInteger',
    :'time_between_eviction_runs_millis' => :'ConfigNodePropertyInteger',
    :'min_evictable_idle_time_millis' => :'ConfigNodePropertyInteger',
    :'connection_properties' => :'ConfigNodePropertyString',
    :'init_sql' => :'ConfigNodePropertyString',
    :'jdbc_interceptors' => :'ConfigNodePropertyString',
    :'validation_interval' => :'ConfigNodePropertyInteger',
    :'log_validation_errors' => :'ConfigNodePropertyBoolean',
    :'datasource_svc_properties' => :'ConfigNodePropertyArray'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
# File 'lib/swagger_aem_osgi/models/org_apache_sling_datasource_data_source_factory_properties.rb', line 285

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      datasource_name == o.datasource_name &&
      datasource_svc_prop_name == o.datasource_svc_prop_name &&
      driver_class_name == o.driver_class_name &&
      url == o.url &&
      username == o.username &&
      password == o.password &&
      default_auto_commit == o.default_auto_commit &&
      default_read_only == o.default_read_only &&
      default_transaction_isolation == o.default_transaction_isolation &&
      default_catalog == o.default_catalog &&
      max_active == o.max_active &&
      max_idle == o.max_idle &&
      min_idle == o.min_idle &&
      initial_size == o.initial_size &&
      max_wait == o.max_wait &&
      max_age == o.max_age &&
      test_on_borrow == o.test_on_borrow &&
      test_on_return == o.test_on_return &&
      test_while_idle == o.test_while_idle &&
      validation_query == o.validation_query &&
      validation_query_timeout == o.validation_query_timeout &&
      time_between_eviction_runs_millis == o.time_between_eviction_runs_millis &&
      min_evictable_idle_time_millis == o.min_evictable_idle_time_millis &&
      connection_properties == o.connection_properties &&
      init_sql == o.init_sql &&
      jdbc_interceptors == o.jdbc_interceptors &&
      validation_interval == o.validation_interval &&
      log_validation_errors == o.log_validation_errors &&
      datasource_svc_properties == o.datasource_svc_properties
end

#_deserialize(type, value) ⇒ Object

Deserializes the data based on type

Parameters:

  • string

    type Data type

  • string

    value Value to be deserialized

Returns:

  • (Object)

    Deserialized data



355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
# File 'lib/swagger_aem_osgi/models/org_apache_sling_datasource_data_source_factory_properties.rb', line 355

def _deserialize(type, value)
  case type.to_sym
  when :DateTime
    DateTime.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
    temp_model = SwaggerAemOsgiClient.const_get(type).new
    temp_model.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

Parameters:

  • value (Object)

    Any valid value

Returns:

  • (Hash)

    Returns the value in the form of hash



421
422
423
424
425
426
427
428
429
430
431
432
433
# File 'lib/swagger_aem_osgi/models/org_apache_sling_datasource_data_source_factory_properties.rb', line 421

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

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
# File 'lib/swagger_aem_osgi/models/org_apache_sling_datasource_data_source_factory_properties.rb', line 334

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)
  self.class.openapi_types.each_pair do |key, type|
    if type =~ /\AArray<(.*)>/i
      # check to ensure the input is an array given that the 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 # or else data not found in attributes(hash), not an issue as the data can be optional
  end

  self
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


321
322
323
# File 'lib/swagger_aem_osgi/models/org_apache_sling_datasource_data_source_factory_properties.rb', line 321

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



327
328
329
# File 'lib/swagger_aem_osgi/models/org_apache_sling_datasource_data_source_factory_properties.rb', line 327

def hash
  [datasource_name, datasource_svc_prop_name, driver_class_name, url, username, password, default_auto_commit, default_read_only, default_transaction_isolation, default_catalog, max_active, max_idle, min_idle, initial_size, max_wait, max_age, test_on_borrow, test_on_return, test_while_idle, validation_query, validation_query_timeout, time_between_eviction_runs_millis, min_evictable_idle_time_millis, connection_properties, init_sql, jdbc_interceptors, validation_interval, log_validation_errors, datasource_svc_properties].hash
end

#list_invalid_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



272
273
274
275
# File 'lib/swagger_aem_osgi/models/org_apache_sling_datasource_data_source_factory_properties.rb', line 272

def list_invalid_properties
  invalid_properties = Array.new
  invalid_properties
end

#to_bodyHash

to_body is an alias to to_hash (backward compatibility)

Returns:

  • (Hash)

    Returns the object in the form of hash



401
402
403
# File 'lib/swagger_aem_osgi/models/org_apache_sling_datasource_data_source_factory_properties.rb', line 401

def to_body
  to_hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



407
408
409
410
411
412
413
414
415
# File 'lib/swagger_aem_osgi/models/org_apache_sling_datasource_data_source_factory_properties.rb', line 407

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = self.send(attr)
    next if value.nil?
    hash[param] = _to_hash(value)
  end
  hash
end

#to_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



395
396
397
# File 'lib/swagger_aem_osgi/models/org_apache_sling_datasource_data_source_factory_properties.rb', line 395

def to_s
  to_hash.to_s
end

#valid?Boolean

Check to see if the all the properties in the model are valid

Returns:

  • (Boolean)

    true if the model is valid



279
280
281
# File 'lib/swagger_aem_osgi/models/org_apache_sling_datasource_data_source_factory_properties.rb', line 279

def valid?
  true
end