Class: ArgoWorkflows::IoArgoprojEventsV1alpha1EventSourceSpec
- Inherits:
-
Object
- Object
- ArgoWorkflows::IoArgoprojEventsV1alpha1EventSourceSpec
- Defined in:
- lib/argo_workflows/models/io_argoproj_events_v1alpha1_event_source_spec.rb
Instance Attribute Summary collapse
-
#amqp ⇒ Object
Returns the value of attribute amqp.
-
#azure_events_hub ⇒ Object
Returns the value of attribute azure_events_hub.
-
#azure_queue_storage ⇒ Object
Returns the value of attribute azure_queue_storage.
-
#azure_service_bus ⇒ Object
Returns the value of attribute azure_service_bus.
-
#bitbucket ⇒ Object
Returns the value of attribute bitbucket.
-
#bitbucketserver ⇒ Object
Returns the value of attribute bitbucketserver.
-
#calendar ⇒ Object
Returns the value of attribute calendar.
-
#emitter ⇒ Object
Returns the value of attribute emitter.
-
#event_bus_name ⇒ Object
Returns the value of attribute event_bus_name.
-
#file ⇒ Object
Returns the value of attribute file.
-
#generic ⇒ Object
Returns the value of attribute generic.
-
#gerrit ⇒ Object
Returns the value of attribute gerrit.
-
#github ⇒ Object
Returns the value of attribute github.
-
#gitlab ⇒ Object
Returns the value of attribute gitlab.
-
#hdfs ⇒ Object
Returns the value of attribute hdfs.
-
#kafka ⇒ Object
Returns the value of attribute kafka.
-
#minio ⇒ Object
Returns the value of attribute minio.
-
#mqtt ⇒ Object
Returns the value of attribute mqtt.
-
#nats ⇒ Object
Returns the value of attribute nats.
-
#nsq ⇒ Object
Returns the value of attribute nsq.
-
#pub_sub ⇒ Object
Returns the value of attribute pub_sub.
-
#pulsar ⇒ Object
Returns the value of attribute pulsar.
-
#redis ⇒ Object
Returns the value of attribute redis.
-
#redis_stream ⇒ Object
Returns the value of attribute redis_stream.
-
#replicas ⇒ Object
Returns the value of attribute replicas.
-
#resource ⇒ Object
Returns the value of attribute resource.
-
#service ⇒ Object
Returns the value of attribute service.
-
#sftp ⇒ Object
Returns the value of attribute sftp.
-
#slack ⇒ Object
Returns the value of attribute slack.
-
#sns ⇒ Object
Returns the value of attribute sns.
-
#sqs ⇒ Object
Returns the value of attribute sqs.
-
#storage_grid ⇒ Object
Returns the value of attribute storage_grid.
-
#stripe ⇒ Object
Returns the value of attribute stripe.
-
#template ⇒ Object
Returns the value of attribute template.
-
#webhook ⇒ Object
Returns the value of attribute webhook.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_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 ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ IoArgoprojEventsV1alpha1EventSourceSpec
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 = {}) ⇒ IoArgoprojEventsV1alpha1EventSourceSpec
Initializes the object
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 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 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 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 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 373 374 375 376 377 378 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_event_source_spec.rb', line 171 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?(:'amqp') if (value = attributes[:'amqp']).is_a?(Hash) self.amqp = value end end if attributes.has_key?(:'azureEventsHub') if (value = attributes[:'azureEventsHub']).is_a?(Hash) self.azure_events_hub = value end end if attributes.has_key?(:'azureQueueStorage') if (value = attributes[:'azureQueueStorage']).is_a?(Hash) self.azure_queue_storage = value end end if attributes.has_key?(:'azureServiceBus') if (value = attributes[:'azureServiceBus']).is_a?(Hash) self.azure_service_bus = value end end if attributes.has_key?(:'bitbucket') if (value = attributes[:'bitbucket']).is_a?(Hash) self.bitbucket = value end end if attributes.has_key?(:'bitbucketserver') if (value = attributes[:'bitbucketserver']).is_a?(Hash) self.bitbucketserver = value end end if attributes.has_key?(:'calendar') if (value = attributes[:'calendar']).is_a?(Hash) self.calendar = value end end if attributes.has_key?(:'emitter') if (value = attributes[:'emitter']).is_a?(Hash) self.emitter = value end end if attributes.has_key?(:'eventBusName') self.event_bus_name = attributes[:'eventBusName'] end if attributes.has_key?(:'file') if (value = attributes[:'file']).is_a?(Hash) self.file = value end end if attributes.has_key?(:'generic') if (value = attributes[:'generic']).is_a?(Hash) self.generic = value end end if attributes.has_key?(:'gerrit') if (value = attributes[:'gerrit']).is_a?(Hash) self.gerrit = value end end if attributes.has_key?(:'github') if (value = attributes[:'github']).is_a?(Hash) self.github = value end end if attributes.has_key?(:'gitlab') if (value = attributes[:'gitlab']).is_a?(Hash) self.gitlab = value end end if attributes.has_key?(:'hdfs') if (value = attributes[:'hdfs']).is_a?(Hash) self.hdfs = value end end if attributes.has_key?(:'kafka') if (value = attributes[:'kafka']).is_a?(Hash) self.kafka = value end end if attributes.has_key?(:'minio') if (value = attributes[:'minio']).is_a?(Hash) self.minio = value end end if attributes.has_key?(:'mqtt') if (value = attributes[:'mqtt']).is_a?(Hash) self.mqtt = value end end if attributes.has_key?(:'nats') if (value = attributes[:'nats']).is_a?(Hash) self.nats = value end end if attributes.has_key?(:'nsq') if (value = attributes[:'nsq']).is_a?(Hash) self.nsq = value end end if attributes.has_key?(:'pubSub') if (value = attributes[:'pubSub']).is_a?(Hash) self.pub_sub = value end end if attributes.has_key?(:'pulsar') if (value = attributes[:'pulsar']).is_a?(Hash) self.pulsar = value end end if attributes.has_key?(:'redis') if (value = attributes[:'redis']).is_a?(Hash) self.redis = value end end if attributes.has_key?(:'redisStream') if (value = attributes[:'redisStream']).is_a?(Hash) self.redis_stream = value end end if attributes.has_key?(:'replicas') self.replicas = attributes[:'replicas'] end if attributes.has_key?(:'resource') if (value = attributes[:'resource']).is_a?(Hash) self.resource = value end end if attributes.has_key?(:'service') self.service = attributes[:'service'] end if attributes.has_key?(:'sftp') if (value = attributes[:'sftp']).is_a?(Hash) self.sftp = value end end if attributes.has_key?(:'slack') if (value = attributes[:'slack']).is_a?(Hash) self.slack = value end end if attributes.has_key?(:'sns') if (value = attributes[:'sns']).is_a?(Hash) self.sns = value end end if attributes.has_key?(:'sqs') if (value = attributes[:'sqs']).is_a?(Hash) self.sqs = value end end if attributes.has_key?(:'storageGrid') if (value = attributes[:'storageGrid']).is_a?(Hash) self.storage_grid = value end end if attributes.has_key?(:'stripe') if (value = attributes[:'stripe']).is_a?(Hash) self.stripe = value end end if attributes.has_key?(:'template') self.template = attributes[:'template'] end if attributes.has_key?(:'webhook') if (value = attributes[:'webhook']).is_a?(Hash) self.webhook = value end end end |
Instance Attribute Details
#amqp ⇒ Object
Returns the value of attribute amqp.
17 18 19 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_event_source_spec.rb', line 17 def amqp @amqp end |
#azure_events_hub ⇒ Object
Returns the value of attribute azure_events_hub.
19 20 21 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_event_source_spec.rb', line 19 def azure_events_hub @azure_events_hub end |
#azure_queue_storage ⇒ Object
Returns the value of attribute azure_queue_storage.
21 22 23 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_event_source_spec.rb', line 21 def azure_queue_storage @azure_queue_storage end |
#azure_service_bus ⇒ Object
Returns the value of attribute azure_service_bus.
23 24 25 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_event_source_spec.rb', line 23 def azure_service_bus @azure_service_bus end |
#bitbucket ⇒ Object
Returns the value of attribute bitbucket.
25 26 27 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_event_source_spec.rb', line 25 def bitbucket @bitbucket end |
#bitbucketserver ⇒ Object
Returns the value of attribute bitbucketserver.
27 28 29 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_event_source_spec.rb', line 27 def bitbucketserver @bitbucketserver end |
#calendar ⇒ Object
Returns the value of attribute calendar.
29 30 31 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_event_source_spec.rb', line 29 def calendar @calendar end |
#emitter ⇒ Object
Returns the value of attribute emitter.
31 32 33 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_event_source_spec.rb', line 31 def emitter @emitter end |
#event_bus_name ⇒ Object
Returns the value of attribute event_bus_name.
33 34 35 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_event_source_spec.rb', line 33 def event_bus_name @event_bus_name end |
#file ⇒ Object
Returns the value of attribute file.
35 36 37 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_event_source_spec.rb', line 35 def file @file end |
#generic ⇒ Object
Returns the value of attribute generic.
37 38 39 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_event_source_spec.rb', line 37 def generic @generic end |
#gerrit ⇒ Object
Returns the value of attribute gerrit.
39 40 41 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_event_source_spec.rb', line 39 def gerrit @gerrit end |
#github ⇒ Object
Returns the value of attribute github.
41 42 43 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_event_source_spec.rb', line 41 def github @github end |
#gitlab ⇒ Object
Returns the value of attribute gitlab.
43 44 45 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_event_source_spec.rb', line 43 def gitlab @gitlab end |
#hdfs ⇒ Object
Returns the value of attribute hdfs.
45 46 47 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_event_source_spec.rb', line 45 def hdfs @hdfs end |
#kafka ⇒ Object
Returns the value of attribute kafka.
47 48 49 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_event_source_spec.rb', line 47 def kafka @kafka end |
#minio ⇒ Object
Returns the value of attribute minio.
49 50 51 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_event_source_spec.rb', line 49 def minio @minio end |
#mqtt ⇒ Object
Returns the value of attribute mqtt.
51 52 53 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_event_source_spec.rb', line 51 def mqtt @mqtt end |
#nats ⇒ Object
Returns the value of attribute nats.
53 54 55 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_event_source_spec.rb', line 53 def nats @nats end |
#nsq ⇒ Object
Returns the value of attribute nsq.
55 56 57 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_event_source_spec.rb', line 55 def nsq @nsq end |
#pub_sub ⇒ Object
Returns the value of attribute pub_sub.
57 58 59 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_event_source_spec.rb', line 57 def pub_sub @pub_sub end |
#pulsar ⇒ Object
Returns the value of attribute pulsar.
59 60 61 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_event_source_spec.rb', line 59 def pulsar @pulsar end |
#redis ⇒ Object
Returns the value of attribute redis.
61 62 63 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_event_source_spec.rb', line 61 def redis @redis end |
#redis_stream ⇒ Object
Returns the value of attribute redis_stream.
63 64 65 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_event_source_spec.rb', line 63 def redis_stream @redis_stream end |
#replicas ⇒ Object
Returns the value of attribute replicas.
65 66 67 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_event_source_spec.rb', line 65 def replicas @replicas end |
#resource ⇒ Object
Returns the value of attribute resource.
67 68 69 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_event_source_spec.rb', line 67 def resource @resource end |
#service ⇒ Object
Returns the value of attribute service.
69 70 71 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_event_source_spec.rb', line 69 def service @service end |
#sftp ⇒ Object
Returns the value of attribute sftp.
71 72 73 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_event_source_spec.rb', line 71 def sftp @sftp end |
#slack ⇒ Object
Returns the value of attribute slack.
73 74 75 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_event_source_spec.rb', line 73 def slack @slack end |
#sns ⇒ Object
Returns the value of attribute sns.
75 76 77 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_event_source_spec.rb', line 75 def sns @sns end |
#sqs ⇒ Object
Returns the value of attribute sqs.
77 78 79 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_event_source_spec.rb', line 77 def sqs @sqs end |
#storage_grid ⇒ Object
Returns the value of attribute storage_grid.
79 80 81 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_event_source_spec.rb', line 79 def storage_grid @storage_grid end |
#stripe ⇒ Object
Returns the value of attribute stripe.
81 82 83 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_event_source_spec.rb', line 81 def stripe @stripe end |
#template ⇒ Object
Returns the value of attribute template.
83 84 85 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_event_source_spec.rb', line 83 def template @template end |
#webhook ⇒ Object
Returns the value of attribute webhook.
85 86 87 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_event_source_spec.rb', line 85 def webhook @webhook end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_event_source_spec.rb', line 88 def self.attribute_map { :'amqp' => :'amqp', :'azure_events_hub' => :'azureEventsHub', :'azure_queue_storage' => :'azureQueueStorage', :'azure_service_bus' => :'azureServiceBus', :'bitbucket' => :'bitbucket', :'bitbucketserver' => :'bitbucketserver', :'calendar' => :'calendar', :'emitter' => :'emitter', :'event_bus_name' => :'eventBusName', :'file' => :'file', :'generic' => :'generic', :'gerrit' => :'gerrit', :'github' => :'github', :'gitlab' => :'gitlab', :'hdfs' => :'hdfs', :'kafka' => :'kafka', :'minio' => :'minio', :'mqtt' => :'mqtt', :'nats' => :'nats', :'nsq' => :'nsq', :'pub_sub' => :'pubSub', :'pulsar' => :'pulsar', :'redis' => :'redis', :'redis_stream' => :'redisStream', :'replicas' => :'replicas', :'resource' => :'resource', :'service' => :'service', :'sftp' => :'sftp', :'slack' => :'slack', :'sns' => :'sns', :'sqs' => :'sqs', :'storage_grid' => :'storageGrid', :'stripe' => :'stripe', :'template' => :'template', :'webhook' => :'webhook' } end |
.swagger_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_event_source_spec.rb', line 129 def self.swagger_types { :'amqp' => :'Hash<String, IoArgoprojEventsV1alpha1AMQPEventSource>', :'azure_events_hub' => :'Hash<String, IoArgoprojEventsV1alpha1AzureEventsHubEventSource>', :'azure_queue_storage' => :'Hash<String, IoArgoprojEventsV1alpha1AzureQueueStorageEventSource>', :'azure_service_bus' => :'Hash<String, IoArgoprojEventsV1alpha1AzureServiceBusEventSource>', :'bitbucket' => :'Hash<String, IoArgoprojEventsV1alpha1BitbucketEventSource>', :'bitbucketserver' => :'Hash<String, IoArgoprojEventsV1alpha1BitbucketServerEventSource>', :'calendar' => :'Hash<String, IoArgoprojEventsV1alpha1CalendarEventSource>', :'emitter' => :'Hash<String, IoArgoprojEventsV1alpha1EmitterEventSource>', :'event_bus_name' => :'String', :'file' => :'Hash<String, IoArgoprojEventsV1alpha1FileEventSource>', :'generic' => :'Hash<String, IoArgoprojEventsV1alpha1GenericEventSource>', :'gerrit' => :'Hash<String, IoArgoprojEventsV1alpha1GerritEventSource>', :'github' => :'Hash<String, IoArgoprojEventsV1alpha1GithubEventSource>', :'gitlab' => :'Hash<String, IoArgoprojEventsV1alpha1GitlabEventSource>', :'hdfs' => :'Hash<String, IoArgoprojEventsV1alpha1HDFSEventSource>', :'kafka' => :'Hash<String, IoArgoprojEventsV1alpha1KafkaEventSource>', :'minio' => :'Hash<String, IoArgoprojEventsV1alpha1S3Artifact>', :'mqtt' => :'Hash<String, IoArgoprojEventsV1alpha1MQTTEventSource>', :'nats' => :'Hash<String, IoArgoprojEventsV1alpha1NATSEventsSource>', :'nsq' => :'Hash<String, IoArgoprojEventsV1alpha1NSQEventSource>', :'pub_sub' => :'Hash<String, IoArgoprojEventsV1alpha1PubSubEventSource>', :'pulsar' => :'Hash<String, IoArgoprojEventsV1alpha1PulsarEventSource>', :'redis' => :'Hash<String, IoArgoprojEventsV1alpha1RedisEventSource>', :'redis_stream' => :'Hash<String, IoArgoprojEventsV1alpha1RedisStreamEventSource>', :'replicas' => :'Integer', :'resource' => :'Hash<String, IoArgoprojEventsV1alpha1ResourceEventSource>', :'service' => :'IoArgoprojEventsV1alpha1Service', :'sftp' => :'Hash<String, IoArgoprojEventsV1alpha1SFTPEventSource>', :'slack' => :'Hash<String, IoArgoprojEventsV1alpha1SlackEventSource>', :'sns' => :'Hash<String, IoArgoprojEventsV1alpha1SNSEventSource>', :'sqs' => :'Hash<String, IoArgoprojEventsV1alpha1SQSEventSource>', :'storage_grid' => :'Hash<String, IoArgoprojEventsV1alpha1StorageGridEventSource>', :'stripe' => :'Hash<String, IoArgoprojEventsV1alpha1StripeEventSource>', :'template' => :'IoArgoprojEventsV1alpha1Template', :'webhook' => :'Hash<String, IoArgoprojEventsV1alpha1WebhookEventSource>' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_event_source_spec.rb', line 395 def ==(o) return true if self.equal?(o) self.class == o.class && amqp == o.amqp && azure_events_hub == o.azure_events_hub && azure_queue_storage == o.azure_queue_storage && azure_service_bus == o.azure_service_bus && bitbucket == o.bitbucket && bitbucketserver == o.bitbucketserver && calendar == o.calendar && emitter == o.emitter && event_bus_name == o.event_bus_name && file == o.file && generic == o.generic && gerrit == o.gerrit && github == o.github && gitlab == o.gitlab && hdfs == o.hdfs && kafka == o.kafka && minio == o.minio && mqtt == o.mqtt && nats == o.nats && nsq == o.nsq && pub_sub == o.pub_sub && pulsar == o.pulsar && redis == o.redis && redis_stream == o.redis_stream && replicas == o.replicas && resource == o.resource && service == o.service && sftp == o.sftp && slack == o.slack && sns == o.sns && sqs == o.sqs && storage_grid == o.storage_grid && stripe == o.stripe && template == o.template && webhook == o.webhook end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_event_source_spec.rb', line 471 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 = ArgoWorkflows.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
537 538 539 540 541 542 543 544 545 546 547 548 549 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_event_source_spec.rb', line 537 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
450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_event_source_spec.rb', line 450 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if 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 # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(o) ⇒ Boolean
437 438 439 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_event_source_spec.rb', line 437 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
443 444 445 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_event_source_spec.rb', line 443 def hash [amqp, azure_events_hub, azure_queue_storage, azure_service_bus, bitbucket, bitbucketserver, calendar, emitter, event_bus_name, file, generic, gerrit, github, gitlab, hdfs, kafka, minio, mqtt, nats, nsq, pub_sub, pulsar, redis, redis_stream, replicas, resource, service, sftp, slack, sns, sqs, storage_grid, stripe, template, webhook].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
382 383 384 385 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_event_source_spec.rb', line 382 def list_invalid_properties invalid_properties = Array.new invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
517 518 519 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_event_source_spec.rb', line 517 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
523 524 525 526 527 528 529 530 531 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_event_source_spec.rb', line 523 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_s ⇒ String
Returns the string representation of the object
511 512 513 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_event_source_spec.rb', line 511 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
389 390 391 |
# File 'lib/argo_workflows/models/io_argoproj_events_v1alpha1_event_source_spec.rb', line 389 def valid? true end |